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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why do I get an error on this Dim command

Status
Not open for further replies.

ChrisOjeda

Programmer
Apr 16, 2003
45
US
I am trying to open a query up into a recordset. I get the error "User-defined type not defined" on the first line. I used to use Access 2.0 in the day. I now have Access 2000. My goal is to access a recordset based on a query so that I can step through the records... PLEASE HELP me on this as it is holding up progress...thanks

Dim dbs As Database
Dim rst As Recordset
Dim strCriteria As String

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("OverUsage", dbOpenDynaset)
 
A2K+ uses ADO instead of DAO. AOK?

Add a reference to the "MICROSOFT DAO 3.6 Object Library" in your code. You can then use "A97"ish code in A2K.

But in some ways, this is like taking the electric starter out of your car and replacing it with a hand crank.

Jim

Me? Ambivalent? Well, yes and no....
Another free Access forum:
More Access stuff at
 
You are right... I got it to work using the Access 2000 code. Good point and it was taken... Chris
 
If WildHare's advice was helpful, don't forget to give him a star...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top