open the same database on the computer

accessman2

Registered User.
Local time
Today, 04:31
Joined
Sep 15, 2005
Messages
335
Hi,

I have a question.

I created the database "Account".

I open "Account" database, and then I go to the file and open it another one. Totally, I open twice on this file.

I want to do that:
When I open the "Account" database, the program check whether or not the Account database was already opened. If there was opened, then close the previous one. And, keep open the new one.

Can we do that on VBA?

Thanks.
 
If you need a username and password to open your database you could,

Create a table to hold username and datelogged in and date logged out

on startup as your form opens you can check this table to see if the current user is logged in if they are output a message saying you are already logged in then close the database
If they are not logged in write their username and date logged in to the table
when they log out write the date logged out to the table
 

Users who are viewing this thread

Back
Top Bottom