Here is how it's done using DAO
Code:' GetWindowsDir is a routine I have that ' finds the Windows system directory which ' is where I store my MDA. If you know the ' path to the MDA you can hard-code it DBEngine.SystemDB = GetWindowsDir() & "MY.MDA" DBEngine.DefaultUser = "myusername" DBEngine.DefaultPassword = "mypassword" DoEvents 'Open the databases ' gsMyPath is defined a string and gdbDB is defined as a Database gsMyPath = App.Path + "\mydb.mdb" Set gdbDB = Workspaces(0).OpenDatabase(gsMyPath)
------------------
Marty
[This message has been edited by MartinLiss (edited 11-15-1999).]




Reply With Quote