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

Dim DB as database not working

Status
Not open for further replies.

WaltLukeIII

Programmer
Jun 28, 2000
199
US
when I try to declare the database variable DB to work inside a sub for a button I can not get a "database" variable it tells me:

"User-defined type not defined"

this is the line that I have
-dim DB as Database-

I have used the line before without any problems.
Thanks for the help in advance.

Walt III
SAElukewl@netscape.net
 

hi there
just dashing off to work

hope this helps

what version are you using because you may have to make the decision DAO or ADO


in modules if you have a function go to that and then look to the menu bar and go to tools references and for DAO
library

add microsoft DAO n.n for whichever version you are in - if you want DAO

otherwise use Add the ADO

make sure you are aware of why and what you are doing here otherise you will get probs down the line

Dim db as DAO.database

Make sure which ever one you use is above the other in the reference list

otherwise DB may be corrupt try repairing and trying again

jo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top