Harry,
>agreed - but this is one of those admin cases...
In that case, I would create a login table to track users in the system and then not allow the admin form to run if there are any other users in the system.
>ah - thats new - you mean, even though I've opened it as 'userfile' in the PDS, the rest of the app may not see it as that?
No, that's not what I mean. I mean a table named MyTable can be open with a different alias name. USED() checks for the alais name not the table name. So the following code will cause an error on the USE line inside the IF;
USE MyTable IN 0
USE MyTable IN 0 Again
USE IN MyTable
IF NOT USED("MyTable")
USE MyTable IN 0
ENDIF
IF NOT USED("MyTable")
USE MyTable IN 0 ALIAS MyTbale AGAIN
ENDIF
>sounds useful, where can I find an example of that approach?
The sample application in VFP (TasTrader) uses one. Also the Application Wizard uses one as well.