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!

Lost DB

Status
Not open for further replies.

TyGwyn

Programmer
Oct 5, 2005
31
0
0
GB
I have just wrote a program using info from a Database, it ran fine , then suddenly stopped working and my VB no longer understands the keyword .DataBase giving me the error "User defined type not defined" when I

Dim dbMYDb as DataBase

the DataBase and other relative functions ie Recordset are no longer available.

Any help appreciated.

Adam
 
In VB...

Click Project -> References

Make sure 'Microsoft DAO 3.X Object Library' is selected.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Check your project references, you should probably be referencing DAO.
 
Feeling silly now..

Working great again but don't understand how it worked for 20 mins and I hadn't added the reference in.

Thanks for rapid response.
 
For reasons that only MS knows (and maybe not even them), references occasionally go MISSING in VB projects. You probably did have the reference properly defined for those 20 minutes but then "magic" happened and you lost it.

As you noted from the instant and accurate responses by gmmastros and JoeAtWork, it's a well-known problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top