compile error

D

Dave Smith

hi all, i just finished a small database & i had to convert it to access 97.
i've put it on the machine it is to run on & i have a compile error in the
switchboard form area.

the line of code reads:
Set Con = Application.CurrentProject.Connection

it highlights the word "CurrentProject" & the error message reads: Compile
Error, Method or Data Member not found

any ideas?

Dave
 
D

Dave Smith

bummer, thanks baz


Baz said:
I'm afraid you could be in big trouble here.

When you say you converted it to A97, clearly what you mean is you had it
in
a later version, and you saved it in A97 file format.

Unfortunately, the CurrentProject object didn't exist in A97, it was
introduced in A2000. What's more, the Connection object is an ADO object:
ADO was also only introduced in A2000.

If you have generally used ADO instead of DAO, you may be able to get some
of it working by including a reference to ADO in the Access 97 version,
but
that will not help you with the "built in" ADO objects such as
CurrentProject.Connection: rewriting the code to use only A97 objects is
the
only option.
 

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