Group:  Microsoft Access ยป microsoft.public.access.modulescoding
Thread: 'Database' not a valid data type??

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

'Database' not a valid data type??
Pendragon 20.09.2006 15:02:01
Very simple data file in Access 03. Single table, one form to manipulate
some data and export to text file via a Print #1 routine. Here's the issue:

Dim MyDB as Database

is not a valid data type. After typing the AS, my options go from
DataAccessPages to DataTypeEnum. Now in another database, I have used this
Dim statement repeatedly and successfully. Why would I not have this option
in another mdb file?

This statement is Private Sub tied to a command button on a form.
Obviously, I am missing something, technically or intuitively. Guidance is
appreciated.
Re: 'Database' not a valid data type??
Stefan Hoffmann <stefan.hoffmann[ at ]explido.de> 20.09.2006 15:08:32
hi,

Pendragon wrote:
[Quoted Text]
> Dim MyDB as Database
>
> is not a valid data type. After typing the AS, my options go from
> DataAccessPages to DataTypeEnum. Now in another database, I have used this
> Dim statement repeatedly and successfully. Why would I not have this option
> in another mdb file?
You need a reference to the Microsoft DAO 3.6 Library.


mfG
--> stefan <--
Re: 'Database' not a valid data type??
Pendragon 20.09.2006 17:31:01
Brilliant!

"Stefan Hoffmann" wrote:

[Quoted Text]
> hi,
>
> Pendragon wrote:
> > Dim MyDB as Database
> >
> > is not a valid data type. After typing the AS, my options go from
> > DataAccessPages to DataTypeEnum. Now in another database, I have used this
> > Dim statement repeatedly and successfully. Why would I not have this option
> > in another mdb file?
> You need a reference to the Microsoft DAO 3.6 Library.
>
>
> mfG
> --> stefan <--
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net