Compile Error: Can't find project or library -- Help?

nuke_girl

Registered User.
Local time
Today, 15:22
Joined
Jul 20, 2004
Messages
22
Hi guys,

First, I should admit that I am dealing with VB code for the first time, and using a module that is WAY more complicated than I should be allowed to touch. :rolleyes:

I just downloaded Kevin S's sample db (A97 version) from here in order to encorperate it into the system I'm building. When I try to run it, I get "Compile Error: Can't find project or library". I understand that this is telling me that I'm using a function (??) or something that it doesn't recognize because it doesn't have the right libraries installed/referenced, but I don't know where to start to fix it. I've found the References dialog, and looked through the Help file, and even just played around to see what happens, but I can't figure out how to make it work. I think that what it's getting stuck on is:
Code:
'If fDoes_DSN_Exists(JDS_DSN_name) = True Then
syscmdresult = SysCmd(acSysCmdSetStatus, "Creating System DSN " & strDSN & "...")

lngResult = SQLConfigDataSource(0, _
ODBC_ADD_SYS_DSN, _
"SQL Server", _
"DSN=" & strDSN & Chr(0) & _
"Server=" & strServer & Chr(0) & _
"Database=" & strdb & Chr(0) & _
"UseProcForPrepare=Yes" & Chr(0) & _
"Trusted_Connection=Yes" & Chr(0) & _
"Description=Database" & Chr(0) & Chr(0))

but i'm not sure how to fix it.

If anyone can help me, or if you can direct me towards a better place to find such basic VB help, that would be really awesome.

Thanks,
~ Nuke ~
 
I had a problem similar to this once before. I opened the form in design view and then viewed the code. Go to Tools>References and see that you have only like the top 3 choices checked.

Visual Basic For Applications
Microsoft Access Library 8.0 (access 97 here too)
Microsoft DAO Object Library 3.51

I had made some forms with custom controls and that thru my application for a loop. I thought it was something wrong with my functions and it wasn't. So, if you messed around with some odd controls on forms you may want to check this spot. I was scratching my head too.. trust me. As far as your code goes....I haven't a clue. Sorry I can't help you out there but I remember the error msg you're getting. Good Luck!!
 
I actually ran into the problem the very first time I opened the db I downloaded from the discussion thread. I haven't even had a chance to put it into my own db and try it out, let alone mess with controls!

Thanks for the advice though, I'll remember that if I get this error again after playing with controls...

~ Nuke ~
 

Users who are viewing this thread

Back
Top Bottom