Conversion from 97 to 2002

Z

Z. Obert

I have a non-updatable query that I open from code like
the following:

Set Qdf = currentdb.QueryDefs("Query1")
Qdf ("[Enter Number1]") = Num1
Qdf ("[Enter Number2]") = Num2
Set Rst=qdf.openrecordset(dbopensnapshot)

This works fine in Access 97, but when I convert it to
Access 2002, I get an error message on the last line
stating "Runtime Error 3001: Invalid Arguement". I think
it may have to do with the query not being updatable, but
I can't change my table structure around to make the query
updatable.

Any Ideas?
 
K

Ken Snell

ACCESS 97 uses the DAO object library by default. ACCESS 2002 and 2002 use
ADO library by default. Open the Visual Basic Editor and set a reference to
the DAO library (DAO 3.6). Then disambiguate your dimensions by prefixing
them with DAO.

Dim Qdf As DAO.QueryDef


If you know that you won't use ADO, then deselect it from the list of
references.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top