TheSearcher
Registered User.
- Local time
- Today, 16:42
- Joined
- Jul 21, 2011
- Messages
- 392
Hello,
I'm trying to improve performance of a split database by incorporating code that opens the back end when the user logs on. I have a procedure called OpenDB that works fine. The code is simple. It is:
Dim db1 As DAO.Database
Set db1 = DAO.OpenDatabase("L:\MyDatabase.accdb", False, False, "MS Access;PWD=MyPassword")
Obviously, I would want to close the back end when the user exits the program using another procedure called CloseDB. I'm having problems with the syntax. How can I reference the database that I want to close?
Dim db1 As DAO.Database
'*** Code to reference database here
db1.Close
Set db1 = Nothing
Thanks in advance for your help!
TS
I'm trying to improve performance of a split database by incorporating code that opens the back end when the user logs on. I have a procedure called OpenDB that works fine. The code is simple. It is:
Dim db1 As DAO.Database
Set db1 = DAO.OpenDatabase("L:\MyDatabase.accdb", False, False, "MS Access;PWD=MyPassword")
Obviously, I would want to close the back end when the user exits the program using another procedure called CloseDB. I'm having problems with the syntax. How can I reference the database that I want to close?
Dim db1 As DAO.Database
'*** Code to reference database here
db1.Close
Set db1 = Nothing
Thanks in advance for your help!
TS