HI
1. Have a reading of..
How to limit the number of users for an application ?
faq184-1263
2. Create one MyUsers file in the network place. One record for each user with user info. Obviously.. you will have some security file related to user and that can be used.
3. As and when the users log in to the application, the first thing to do is to LOCK his record in this user file in a separate DataEnvironment. This means, MyUser file will remain open with one record locked at startup. This can be done by having a form with this MyUser Table in its data environment (private data environment.) and Form.Visible = .f.
4. Forget about this file.. till the user logs out of application. The QUIT from the application will auto close this.
5. This ensures that the user cannot login from 2 different terminals at the same time.
The thing is that when a system crashes, the record lock automatically gets removed, and the record becomes available. No clean up is required.
Now to find out if a user is loked in.. do a reading of this myUsers file and try to lock the users personal record. If record can be locked.. then the user is not in the system at that moment. Remember to unlock immediately.
Hope this helps

ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com