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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows 98 and Access 2000 Report 1

Status
Not open for further replies.

littleboots

Technical User
Nov 5, 2002
13
GB
Hi

I have a basic report & query which I've set up in Access 2000 on a Windows 2000 PC.
When collegaues try to run the report on their PCs, on Access 2000 and Windows 98, they get the following error: "Undefined Function 'Left' in expression".
I ahve checked that the query works OK, and there's no problem there. I just can't get the Report to run and there's no obvious reason why

Any ideas???
 
If the query runs OK in the Query Builder then you've eliminated that it's not the query.

Sounds like you've probably tried to use the function "Left(string, integer)" somewhere in your Report, and typed it in incorrectly.

I hope this helps!
 
But if the report works OK on my PC (Windows 2000) then how can I have typed an expression incorrectly??!

The report fails only on the Win98 machines

The query runs OK on both Win98 and Win2000
 
Sounds like you don't have your References set on the other machines. Open any module and on the menu bar go to Tools...References. Double check to make sure that the references that have check marks in the boxes are the same ones that are checked on your machine.

Paul
 
If the report does work on your PC then Paul's advice will be the solution.

If the References on the other PC's aren't the same then you can locate the path to the dll's or object library files on your machine, listed on the Reference screen at the bottom under 'Path'.

You might have to copy your dll's to their machine then use regedit to register the files on their PC.

ENLGAND 2 TURKEY 0 . . . Ree-sult!



 
I've just tried checking the References in Tools (found that I needed to be in Visual Basic to do this! Is that correct?). The same boxes were checked....
 
The only place you can see the references is in a VBA module so that is where you should be. I'm not sure which library holds the Left function. I believe the .dll's are a part of Office and not windows but I could be wrong. Another thing to try is this. Go to one of the offending machines. Open a module and in the Debug Window (Immediate window) type in ?Left("12345",2) and see what happens. If you get an error message then open the references again and look to see if any libraries are marked as missing. If they are then either select it or, if it's already selected, deselect it and reselect it. If someone knows the correct .ocx we might be able to pinpoint where it should be. It may be in the wrong place for the app to see it. I looked in the KB and couldn't find anything specific about the issue.

Paul
 
When any of the references are missing, other functions that are not missing will still fail. Since most VBA code that us developers write use the basic functions such as Mid, Date, Trim, Chr ... first, these are the first to give you an error message.

Whenever one of these functions is 'Missing' it is usually an indicator that some other module is missing.

Missing is a bad term, usually the module in question is not really missing but rather has been installed in a different location (Directory or Sub Directory)

Wish Microsoft would have made this easier, but....

Here is another thought, if you send someone an 'mde' version of your access database, they can not fix the reference issue since they can not get to the VBA Code.
Same problem if you send the code but protect the code with a security file. Microsoft loves to challenge us developers.

Hope This Helps,
Hap [2thumbsup]
Access Add-on developer [pc] - [americanflag]
 
Hello

It was the References in the Visual Basic - someone from IT came over to give me a hand but didn't know where it was going wrong, then when I showed them your suggestion he managed to get it to work... so thank you for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top