method or data member not found in access 2016

dailymeat
dailymeat used Ask the Experts™
on
I get this message when I run this code in Access 2016, I don't get it if I run it in Access 2003, please see attached
Jaile.pdf
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
John TsioumprisSoftware & Systems Engineer

Commented:
You must declare rst as DAO.Recordset...probably you forgot the reference
NorieAnalyst Assistant

Commented:
How have you declared rstDetails?
Fabrice LambertConsulting
Distinguished Expert 2017

Commented:
Rules of thumb:

Always use Option Explicit at top of your modules.
Always declare and fully qualify your variables.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Thank you for your help, I did not realize that I did not sent you the beginning of the code, please find it attached.
Thanks.
Jaile.pdf
Consulting
Distinguished Expert 2017
Commented:
It looks like an ambiguity issue between DAO recordset and ADO recordset.
(guess you referenced the ADODB library ?)

Always fully qualify your variables:
DAO.Database instead of Database.
DAO.Recordset instead of Recordset.

Also, think about using to late binding instead of early binding (that is: using explicit references).

Author

Commented:
That worked!! Thank you.
John TsioumprisSoftware & Systems Engineer

Commented:
In the 1st post i have pointed you to the solution but you probably you missed it...anyway...

Author

Commented:
Sorry, not sure what can I do

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial