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.