View Full Version : Button code


Anders
04-19-2001, 11:25 PM
I have a button on a form, made in Access 2000. When converted to run in Access 97, I receive an error.

Set db = CurrentDb
Set rs = db.OpenRecordset("Qtblvessels")

Above code is used, but apparently Access 97 doesn't recognize the "db" part after the "Set" command. What can I use in stead?

ElsVanMiert
04-20-2001, 05:16 AM
Did you declare these vars correctly with:

Dim DB as database
dim RS as recordset

Does the "Qtblvessels"-Query exist?
As far as I remember DAO there are parameters for the recordset that might be missing as well.