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

references question??

Status
Not open for further replies.

atadbitslow

Programmer
Feb 26, 2001
301
0
0
US
I am working on an Access 2000 database and I get a "compile error: user-defined type not defined" on this statement: Dim dbs as database.

Why does this happen??

Thanks!

 
Exactly correct; you have a references problem.

Open a module (or press ^G to get the debug window)

Select Tools-References

Enable the Microsoft Data Objects 3.6 Library

Please, no star for this, the question comes up at least twice a week.
 
Thanks--

Now I get a "Compile error: Method or data member not found" on this line of code:

Set rst=dbs.openrecordset("Select * from res where [ID]=" & Me.ID) . It stops on the .ID at the end of line.

Why is this??

Thanks!
 
You probably don't have a field named 'Id' in your form. Check out the name property of the textbox in question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top