Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordsets

Status
Not open for further replies.

FoxStudent

Technical User
Feb 24, 2000
85
GB
I am trying to execute the following code in a form load event. Module is defiantly a table in regdata.mdb. However, I keep getting a type mismatch at the last line of this code.
Dim db As Database
Dim CreatMod As Recordset
Set db = OpenDatabase("A:\Interaction\RegData.mdb")
Set CreatMod = db.OpenRecordset("Module")

Can anyone help me!
thank u
 
If Regdata is the current db, I mean it's the one you're working on, I suggest this :

I wouldn't use Module as a table name cos in access it refers to a module object and may cause problems.

Dim db As Database
Dim CreatMod As Recordset
Set db = Currentdb
Set CreatMod = db.OpenRecordset("Mod",dbOpenTable)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top