Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2005, 10:41 AM
Registered User
 
Join Date: Nov 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default project or library not found error

I have an Access 2000 database that has been operating for about 2 years without an issue. The whole mdb file is on the server (no front end / back end) and is used on perhaps 5 machines throughout the company.

All of a sudden, when a report is called with "no data", a custom message should appear. This works on one machine (mine), but now causes an error on all other machines, with a "Chr(13)" (return) highlighted. When I take out the "Chr(13)" the code executes on all machines. Why would one machine be different?

The code:
Private Sub Report_NoData(Cancel As Integer)
MsgBox "The report has no data." & Chr(13) & "Check your Dates and operator information." _
& Chr(13) & "If operators have not been updated this report will not print!", _
vbInformation, "No Report Data"

Cancel = True
End of the code.

I had a similar incident with code inserting a date on a form, and ended up commenting out the code for the time being.

Why would this happen after 2 years of operation? Why would one machine work, and not others? What causes a library or project to be missing? I can work around this, but really want to understand what is happening. Any help is appreciated - Ken

 
Old January 10th, 2005, 01:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It sounds like your IT people have been updating your company's machines and (deliberatly or not) either moved or deleted one of the dll/ocx files your database is dependent on.

My recommendation? Mount a 24/7/365 guard on the remaining machine and deal violently with any IT guys who stray within the exclusion zone...:D


Brian Skelton
Braxis Computer Services Ltd.
 
Old January 10th, 2005, 04:11 PM
Registered User
 
Join Date: Nov 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Interesting - we are a small company and don't really have an IT department. I wonder how things would get moved or deleted. It seems odd that character codes and date functions would go bad...

I think I'll try re-installing MS Office on one of the suspect machines and see if that helps - does that sound resonable?

 
Old January 10th, 2005, 04:18 PM
Authorized User
 
Join Date: Jul 2004
Posts: 46
Thanks: 0
Thanked 1 Time in 1 Post
Default

It's not Office. It looks to me as if your installation of Windows has been corrupted. The previous correspondent was correct in thinking along the lines of dll files. This happens regularly on busy machines, why? I do not know. It looks to me as if your International Settings and ASCII converters have gone awry. Try Windows, not Office

Alan T

 
Old January 10th, 2005, 09:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 120
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ken

If any of your library references are missing or corrupted the simple, 'inbuilt', VBA functions tend to stop working. It's usually shows itself with the left/right/mid functions in my databases.

If you open the database on one of the broken machines and look at the references do any of them show as missing?


Brian Skelton
Braxis Computer Services Ltd.
 
Old February 4th, 2005, 01:01 PM
Registered User
 
Join Date: Nov 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Braxis
 Ken

If any of your library references are missing or corrupted the simple, 'inbuilt', VBA functions tend to stop working.
That was it - I finally had a chance to get back to this - I had checked a reference for a completely different function in a completely different database. It was "missing" on the other computers. I unchecked, problem went away.

Thanks!!:)






Similar Threads
Thread Thread Starter Forum Replies Last Post
native library not found elixiradeel Apache Tomcat 1 June 20th, 2008 12:59 PM
compile error: can't find project or library bruty Excel VBA 1 August 2nd, 2007 06:12 AM
VB compile error: can't find project or library bambam Beginning VB 6 2 November 16th, 2006 03:16 PM
Can't find Project or Library. dpkbahuguna Beginning VB 6 1 September 7th, 2006 07:18 PM
Compile error(Can't find project or library) shamala Excel VBA 1 February 21st, 2006 04:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.