database shorthand

jaycie

New member
Local time
Today, 21:14
Joined
Jul 3, 2002
Messages
8
I have created a database using the RecordSet function. So for example:

Set History = db1.OpenRecordSet ("InventoryHistory")

HOwever, previous to this function, I declared :

dim History as Database

and then:

Set dbsCurrent = OpenDatabase("c:\fluid system database\fluidsys22.mdb")

Is there a way to just declare the database as the current one? Because what happens if I change the database's name or directory (it will probaly mess up the function)?

Is there some shorthand to it, like Me.something, instead of Forms!FormName.something?

Please help!
 
You will need to make a reference to DAO ("Microsoft DAO x.x Object Library")

Then you can do
Code:
Dim db as Database
Set db = CurrentDB
 
how would i make a reference to DAO .. . is it an option in the menu? or is it just a module or what?

Thanks, for your input, though.
 
In the code window go to Tools | References then find it in the list.
 

Users who are viewing this thread

Back
Top Bottom