compile error: can't find project or library

G

Guest

I am trying to open an address book file in Access and I get an error message
that says "Compile Error: can't find project or library). I'm then
redirected to Visual Basic and two lines of code are highlighted as follows:
"Private Sub FillOptions ()", and then further below,
"Dms dbs As Database".

Does anyone know what any of this means?

Thanks!
 
W

Wayne Morgan

Have you opened this database before? If not, go into the code window and go
to Tools|References. Make sure there is a check next to Microsoft DAO 3.6
Object Library. If there isn't, scroll down until you find it and check it.

If that doesn't solve the problem, then I recommend the following reading on
"broken references".

http://members.iinet.net.au/~allenbrowne/ser-38.html
 
A

Andi Mayer

I am trying to open an address book file in Access and I get an error message
that says "Compile Error: can't find project or library). I'm then
redirected to Visual Basic and two lines of code are highlighted as follows:
"Private Sub FillOptions ()", and then further below,
"Dms dbs As Database".

Does anyone know what any of this means?
Yes, you didn't compiled it when you wrote it, because then only one
line would be highlighted

while typing you have seen one line turning red? there is the error

a debug----compile would have jumped to this line with: syntac error

DMS is an unknown command, it should read Dim
 
G

Guest

THANKS! for your prompt assistance, Wayne!
I HAVE opened this address book before and have not had problems printing my
labels. The "References" choice was NOT highlighted (and was therefore
UNselectable) when I went to the Tools menu within the code window. I'll
check the link that you provided regarding broken references. Any other
ideas?
 
G

Guest

Hi Wayne -

I checked the link that you provide concerning "broken references", but it
ALSO told me to go to the Tools menu and select "References". However, as I
mentioned in my earlier email, the "References" selection is NOT highlighted
on the Tools menu and is therefore UNselectable. Am I doing something else
wrong?

Thanks!

REEVES
 
G

Guest

THANKS! Andi for your response!
First, you are correct, the code said "dim", NOT "dms" as I erroneouosly
typed.
Do you have any idea how I can fix this problem. Wayne suggested that I
select "References" on the Tools menu of the code window, however, that
option isn't highlighted and is therefore UNselectable. Any ideas?

REEVES
 
A

Andi Mayer

THANKS! Andi for your response!
First, you are correct, the code said "dim", NOT "dms" as I erroneouosly
typed.
Do you have any idea how I can fix this problem. Wayne suggested that I
select "References" on the Tools menu of the code window, however, that
option isn't highlighted and is therefore UNselectable. Any ideas?

if you are in debug mode you can't select it,
stop the running code and the set the reference to DAO
 
W

Wayne Morgan

The code is probably still running, it's just in Break mode. Click the reset
(stop) button on the toolbar or go to Run|Reset.
 

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