Invalid argument error generated with openrecordser dbopentable

accesser2003

Registered User.
Local time
Today, 23:48
Joined
Jun 2, 2007
Messages
124
I have a strange error:

I open a table by following

dim db as database
dim Rs as recordset

set _ db=dbengine.opendatabase "AMD",dbdriverprompt,FALSE,"ODBC;DATABASE=AMD;DSN=Remote")

set rs=db.openrecordset("AllAttendanceEvents",dbopentable)

when excutes the red line code, it generate the erroe: Invalid argument.

I already added the Micosoft DAO 3.6 Object Library.

PLEASE HELP,
 
I don't know if it will help, as I'm not very good at DAO code, but here are two things I noticed:

1. Declare db and rs as

Dim db As DAO.Database
Dim rs As DAO.Recordset


2. set _ db needs the underscore removed (if it is really there - it might just be a typo here where you've typed the code).
 

Users who are viewing this thread

Back
Top Bottom