Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access function "Right" sometimes gets an error

Status
Not open for further replies.

DangYai

Technical User
Nov 6, 2001
5
0
0
US
I am using the following test code.

txtResult = Right(txtString, txtInt) & " " & Asc("Apple")

It is in a database on a server. From most computers it works fine. On others I get the error, "Can not find project or library." I can take the same code, put it in a new database and it runs!

Any ideas what could cause this problem.

Thanks.
 
Make sure that all your references are available on the system not working.

( In the CODE window, TOOLS , REFERENCES)
 
FEDSEC:

I checked the references on the systems, the same ones are checked on both.

DangYai
 
debug.print txtString
debug.print txtInt

txtResult = Right(txtString, txtInt) & " " & Asc("Apple")

txtString and txtInt are both variables. What is the value in each when it does not work?
 
I have had this problem before, referances is the problem area and when it happend to me all the referances looked OK. I reinstalled MS Access on the 5-6 PC's effected and everythin was fine after that !
 
I had this very problem yesterday and Grog_600 's solution worked for me. I would use add/remove program to get rid of the current version before reinstalling.
 
To all a hearty THANKS.

You got me going in the right direction.

Even after reinstalling Office, some computers did not work. However, when I looked at the references again I decided to uncheck them, click ok, recheck them, click okay, and it WORKED.

Thanks again, you pointed me in the right direction.

DangYai
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top