Converting old DAO syntax (i.e. Openquerydef)

J

JGawlik

I have been called to convert an old Access 97 database to Access 2003. I
haven't worked in Access for a long time and would appreciate a push in the
right direction.

I've converting the data and code databases and got them linked. When I
compile the code, it stops on the OpenQueryDef line:

Set qs = db.OpenQueryDef("qryAppend Billed_Fees Snapshot")
qs.Parameters("FisYear") = FisYear
qs.Execute
qs.Close

How do I re-write this? There are dozens of them in the whole project. I
know it might use CreateQueryDef but is there anything else besides
replacing that?

Is there a good location somewhere with a listing of all the old syntax and
how to replace it? I'm sure this is just the beginning!

Is there any benefit to activating the DAO 2.5/3.51 compatibility Library?

Thanks!
Jackie
 
A

Albert D. Kallal

Set qs = db.OpenQueryDef("qryAppend Billed_Fees Snapshot")
qs.Parameters("FisYear") = FisYear
qs.Execute
qs.Close

Also, are you sure the above code is correct?

it should read:

set qs = db.QueryDefs("qryAppend Billed_Fees Snapshot")

Did this code compile in a97 before you converted?
(as a another hint, don't try and convert something with compile
errors...make sure it compiles BEFORE you do the conversion from a97 to
a2003.
 

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