CHR function in VBA

  • Thread starter Thread starter Matthew de Rouville
  • Start date Start date
M

Matthew de Rouville

I am having trouble getting the Chr function to work in Access 2000
(9.0.2720). I have VBA code with the Chr function. When I try to run it,
the function is highlighted in the VBA editor and the following message
comes up: "Compile Error. Can't find project or library."

The code works in Access 2002 (10.3409.3501) SP-1.

What I am trying to do is insert a carriage return and line feed in a memo
field. I am using chr(13) & chr(10), which works on the Access 2002
machine.

Any ideas? Thanks.

Matt
 
I found the references and saw several "Visual Basic for Application" ones;
I checked them all. I got an error message about a naming confict, but my
macro works. Thanks.
 
In the bottom part of the References window you should see the path to the highlighted
reference. The one for the correct VBA in Access 2002 is

C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL

Adjust for which drive your Windows installation is on. To get the path, you can type

?References("VBA").FullPath

in the Immediate Window (Ctrl+G). A long path is frequently cut short in the References
window.
 
Back
Top