473,396 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Compile error: Can't find project or library

Hi, I have this complete Audit database at work that I inherited from someone who left late last year, it has been working fine up until this week. There are report form section that I can select reports by specific topics, but when I select and press that report button, instead of the report opening up, I get the this error message pop up "Compile error: Can't find project or library" and then the Visual BAsic editor opens with code info displayed for the report from I selected. THe windows appear wit the "stLinkCriteria" selected., here is what the code looks like;


Expand|Select|Wrap|Line Numbers
  1. Private Sub Command24_Click()
  2. On Error GoTo Err_BtnAllOutstanding_Click
  3.  
  4.     Dim stDocName As String
  5.  
  6.     stDocName = "frmRptRecomBySection"
  7.     DoCmd.OpenForm stDocName, , , stLinkCriteria
  8.  
  9. Exit_BtnAllOutstanding_Click:
  10.     Exit Sub
  11.  
  12. Err_BtnAllOutstanding_Click:
  13.     MsgBox Err.Description
  14.     Resume Exit_BtnAllOutstanding_Click
  15. End Sub
It nows happens on 3 out of 6 reports which use to work.

Any help or suggestion would be nice.

Cheers
Nekker
Feb 7 '07 #1
4 7559
nico5038
3,080 Expert 2GB
Try:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command24_Click()
  2. On Error GoTo Err_BtnAllOutstanding_Click
  3.  
  4.     Dim stDocName As String
  5.  
  6.     stDocName = "frmRptRecomBySection"
  7.     DoCmd.OpenForm stDocName
  8.  
  9. Exit_BtnAllOutstanding_Click:
  10.     Exit Sub
  11.  
  12. Err_BtnAllOutstanding_Click:
  13.     MsgBox Err.Description
  14.     Resume Exit_BtnAllOutstanding_Click
  15. End Sub
  16.  
As there's no Dim for the stLinkCriteria and it's not filled either.
Also check or there's no Dim stLinkCriteria at the top of the code...

Nic;o)
Feb 7 '07 #2
MSeda
159 Expert 100+
does it happen on all computers, some, or just yours?
sometimes when updates are applied to other programs (Like Outlook) the references Library gets messed up.
usually the line of code that gets highlighted when this happens has absolutely nothing to do with the error.
in the VB editor click tools then references and see if any are labeled MISSING:
uncheck these.

http://support.microsoft.com/kb/283806
Feb 8 '07 #3
I would like to thank you both for your assistance with this matter but MSeda hit the nail on the head. He was spot on with his suggestion, it was exactly the problem the article stated. I removed the tick from the missing reference link and it all works again. I think it was due to a recent upgrade from Office Xp to Office 2003. Anyway, your fast responses have helped me from having to re-create a new database from scratch.

Cheers
Nekker
Feb 8 '07 #4
MSeda
159 Expert 100+
Glad to help.
Feb 8 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Familie Spies | last post by:
Hi all, When running a program I made in VB under Windows XP i'm getting the following error: ! Compile error. Can't find project or library. (see also http://home.kabelfoon.nl/~hspies/2.jpg ) ...
0
by: Xiaofeng Zhang | last post by:
when I compile my project setting, there are many LINK errors. But when I compile my project under debug setting, everything is OK. How can I deal with it? The errors is followed. Linking......
2
by: Qiao Yun | last post by:
I used vc++.net (visual studio .net ) to open a project which can work well in vc++6.0. I succeeded in compiling the project in vc++.net in release mode . But when I tried to compile the project...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
5
by: TreatmentPlant | last post by:
Very late last night I was working on a project. When I left it - it worked and all was sweet! After a nap I came back to it this morning to find that the project will not compile and I keep...
1
by: rave3085 | last post by:
Helo friends, I Had a VB Project in my system which was not done by me! But when i tried to Run that it gave me a message! Compile Error: Can't Find Project Or Library! Immediately after...
1
by: Bob | last post by:
Hi all, I've created a database at work and have copied it to home but have had some problems when I try to open the main form. The error when I run it is: Compile error: Can't find project...
2
by: wouter | last post by:
Hello, Being a chemical engineering i'm only little acquainted with programming. However I made a made a excel program with macro's using VBA. This program is used a lot in our company. However...
1
by: squrel | last post by:
Hello all.. i need a very urgent help here... i have done a project in VB6 and SQLServer 2000 but few days back my pc had to get formatted and i took the back up of my project. i have installed VB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.