I have created a form that allows a user to edit a table, but not until they login with a username and password. Otherwise, the table cannot be edited, and is just used as a reference.
I wanted to set up a routine so that after a specified amount of time, the form will automatically log the user off in case they forget to do it themselves. I do not want unauthorized users editing these tables.
I searched around and came accross the following routine:
This code is easily called from any other routine. My problem is that when the form calls this code, it prevents the user from doing anything else on the form. I would like them to be able to edit the table on the form for 5 minutes, then have it automatically log them off, but my computer is basically stalled while it waits for the specified time to end before it frees up again.
Is there a better way to solve this problem? Is there a way to use this function and still allow users to edit the table while it is running?
Thanks
I wanted to set up a routine so that after a specified amount of time, the form will automatically log the user off in case they forget to do it themselves. I do not want unauthorized users editing these tables.
I searched around and came accross the following routine:
Code:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
This code is easily called from any other routine. My problem is that when the form calls this code, it prevents the user from doing anything else on the form. I would like them to be able to edit the table on the form for 5 minutes, then have it automatically log them off, but my computer is basically stalled while it waits for the specified time to end before it frees up again.
Is there a better way to solve this problem? Is there a way to use this function and still allow users to edit the table while it is running?
Thanks