By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,984 Members | 2,615 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,984 IT Pros & Developers. It's quick & easy.

I can't use Dim dbs As Database

P: n/a
I have to call table from database but when I use
Dim dbs As database
set dbs =CurrentDb()

I show error since the first "Dim dbs As database" sentense which
error is "User-defined type not defined" I would like to know how to
set to use database command.
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
If you are using Access 2000 and above go into your module (form or module),

(1) Go into Tools References and make sure the Microsoft ActiveX Data Object
Library 2.1 (or what ever version is checked) is unchecked.

(2) Find Microsoft DA0 3.6 (preferred) or 3.51 in the list and check it.
Intellisense should give you Database as an property in the Dim dbCurrent as
Database.

(3) If you have other issues with QueryDefs etc, you can check the Microsoft
2.51 /3.5 Compatibility Layer .
(1) and (3).

Option (2) is prefered.

Hope this helps.

Barry

"Piyarat" <pi*****@thailand.com> wrote in message
news:9c**************************@posting.google.c om...
I have to call table from database but when I use
Dim dbs As database
set dbs =CurrentDb()

I show error since the first "Dim dbs As database" sentense which
error is "User-defined type not defined" I would like to know how to
set to use database command.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.