User-define type not defined

D

Dan

I'm trying to run a program to determine who is on the database. When I run
this on my C-drive everything works. However, once I placed it on the server
where my database is located I get the following message "Complie error:
User-define Type not defined" with the following highlighted in my code in
yellow "Private Function WhoesOn() as String" then in blue "Dim dbCurrent as
Database". I'm assuming because it is now on a network that I need to change
Database to something else in order for this to work, but I'm not sure what
to do.
 
D

Douglas J. Steele

Something doesn't make sense here. Just because the MDB file is located on
the server shouldn't impact anything: you're still running Access on the
client. Not only that, but references live in the MDB. Sounds as though
you're not simply moving the same MDB from one place to another.

In any case, the Database object is part of the DAO model. Assuming Access
2000 or newer, while in the VB Editor select Tools | References from the
menu bar, scroll through the list of available references until you find the
one for Microsoft DAO 3.6 Object Library, and select it.
 
D

Dan

References is not a hightlighted option to choose in Tool. Could it be that
I'm locked out of using this function on the server by the adminstrators of
our computer system? My database is located in a folder for our department
 
D

Douglas J. Steele

Are you perhaps dealing with an MDE, not an MDB?

If it is an MDB, are you in the VB Editor when you're trying to do this?

If you are in the VB Editor, make sure that no code is running (click on
Reset on the Run menu to make sure)
 
D

Dan

How do I know what I'm running?

Douglas J. Steele said:
Are you perhaps dealing with an MDE, not an MDB?

If it is an MDB, are you in the VB Editor when you're trying to do this?

If you are in the VB Editor, make sure that no code is running (click on
Reset on the Run menu to make sure)
 
D

Douglas J. Steele

What's the extension of the file: .MDB or .MDE? (not that this is guaranteed
to accurate)

The real way to know is to open the Immediate Window (Ctrl-G), type the
following there:

?CurrentDb.Properties!MDE

and hit Enter.

If it returns T, you've got an MDE. If it doesn't return T (or, more likely,
it returns a Property Not Found error), you've got an MDB.
 
D

Dan

Thanks everything is working

Douglas J. Steele said:
What's the extension of the file: .MDB or .MDE? (not that this is guaranteed
to accurate)

The real way to know is to open the Immediate Window (Ctrl-G), type the
following there:

?CurrentDb.Properties!MDE

and hit Enter.

If it returns T, you've got an MDE. If it doesn't return T (or, more likely,
it returns a Property Not Found error), you've got an MDB.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top