DAO "edit" method for a recordset is no longer found

M

Mike7491

I just converted an Access 2003 app to Access 2007 format. Now when I try to
compile the VBA code, the compiler croaks on the DAO recordset "edit" method.
This code worked fine under Access 2003. All my same references are in
place.

Any help will be much appreciated.
 
A

Allen Browne

Suggestions:

1. At the top of the procedure, explicitly declare that you want a DAO
recordset, e.g.:
Dim rs As DAO.Recordset

2. Make sure you have the correct DAO reference for the type of database.
For details on solving library reference problems, and the right ones to use
for each version, see:
Solving Problems with Library References
at:
http://allenbrowne.com/ser-38.html

3. Make sure the code compiles: Compile on Debug menu (in the code window.)
 
M

Mike7491

Thanks a lot Allen. You continue to be a national treasure! I'd love to
meet you some time.

RE: your advice to "explicitly declare that you want a DAO recordset":

I've been doing this religiously since ADO came out, so that's not the issue
here. However, as I said, all my old library references are showing in the
Reference list as OK. Nevertheless, I will re-check that and make sure I
have the latest version of the DAO lib in place, then I'll report back here
one way or the other. Perhaps this can help some other hapless soul.

BTW -- just to be clear: the compiler claims that the "edit" method is not
found. In fact Allen, I've suffered a long string of nighmares on this whole
issue of running long proven Access 2003 apps using Access 2007 (even with
the right Trust Center settings) in a Vista OS environment -- apps that that
ran just fine with XP and Access 2003 -- on thousands of PCs! Even when the
compiler completes, runtime now croaks on simple, common VBA library
functions like "Time" and "Date". So this report I made here is just the tip
of the iceberg. Microsoft Support (even as good as they are -- which is
awesome) seem to be stumped on this.

For the record, I'm running this on a new Vista Ultimate 64 (SP1) PC with an
Intel DC Quad CPU and 8 GB of RAM. All hardware and OS updates are done.

Thanks again Allen,

-- Mike
 
A

Allen Browne

Okay: just to be clear, the 3 standard references for an MDB opened in A2007
should be:
- Visual Basics for Applications
- Microsoft Access 12.0 Object Library
- Microsoft DAO 3.6 Object Library

(The 2nd one will automatically be different when you open the MDB in
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