Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax issues! 1

Status
Not open for further replies.

sera

Technical User
Jun 29, 2000
360
US
Hello All,
I am trying to code in Microsoft Access 2000. I have a piece of code that works in Access 97. I don't know what happened but this code is not recognized by 2000.

Dim Rs as Recordset
Dim Db as Database

Set Db = CurrentDb()
Set Recordset = Db.OpenRecordset(SQL, dbOpenSnapshot)

Can someone convert this for me. It does not recognize Database as a datatype.

Thanks
Sera
 
Sera:

Been there done that.

Open any code window and click on Tools from the Menu Bar and then select References.

Scroll down the list to find Microsoft DAO 3.6 Object Library and check the box to set it as an active reference.

Then move it as far up the list as possible (should precede the ADO reference).

You may still need to modify your code to specify DAO

Dim Rs as DAO.Recordset
Dim Db as DAO.Database

But that should do the trick for you. Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Thanks. That is exactly what I was looking for. Does anyone else hate the way that Access has redone its help files? They don't really seem to be much help at all.
Arrrgh. I can never figure out if I am reading Visual Basic Help or VBA help. Is there even VBA help?
Sera
 
Sera:

Your welcome. Glad I was able to help.

Yeah! Access 2000 Help isn't.

I have found that it is a bit more specific to VBA if you access it from the code window. I still do not like the format; Access 97 was much better in this regard Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
I sure am glad that I am not the only one who thinks that Access 2000 help is bad. I don't know what they were thinking!
Sera
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top