Hi, I am using Access 2002 The IfNotInList event doesn't work as givin in the course. For as far I am able to see there are 2 lines giving a trouble (allthough Access only giving 1 at a time and doesn't show the next problem before sorting out the first)
first line with problem Dim db As database
second line Set rs = db.openrecordset("StateT")
Can help someone help me out?
On typing the code there apears a list of VBA codes which I don't manege to figure out. The VBA help I've got doesn't allow me to search by topic;
Thankx
Reply from Richard Rost:
Access 2002 uses ADO as the default recordset type, so you have to make sure you have a reference to DAO in your "references" section (as I talk about in Access 320) and make sure it has a higher priority than ADO.
I just looked at your account and I see you skipped Access 320. This is why almost all of my courses have pre-requisites... because they're based on the material in the previous classes. Access 320 lays down the foundation for all of the recordset material in 320 to 329. Skipping that class causes you to miss a LOT of important information.
As a quick fix, open up any form in your database. Go to design view. Click on View > Code. This will open the VBA editor. Go to Tools > References. Make sure "Microsoft DAO x.x Object Library" is checked and that it has a higher PRIORITY (use the arrows) than "Microsoft ActiveX Data Objects." Save, close, and reopen the database, and now all of my recordset code should work as shown.
And I strongly recommend you take Access 320 before 324. Like I said, it has all of the material that EXPLAINS what's going on in the rest of the 32x classes.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Microsoft Access 324.