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!

Strange Behavior with SQL

Status
Not open for further replies.

ogri

Programmer
Sep 26, 2000
74
GB
Hi

I have a form in Access which I use to set off a report. If I do this first then it works fine (ie, dont use any other buttons on forms). If I use any of the other buttons then I get the following error message:-

Run-time error '3075':
Function isn't available in expression in query expression 'left(GAINReject.CRN,9) = UrgCusts.shortCRN'

The SQL is to pull data off from one table where the first 9 digits of a column are within another table

Any ideas? Especially as it CAN work fine if used first

All the best

Keith
 
Sounds like an old and traditional Access bug. Add a reference to and code library, delete it, close Access and then restart. It should then recognise Left() as a function.

Craig
 
Hi

Sorry, but you have lost me with that one. What do you mean

Thanks alot

All the best

Keith
 
Go into the code window, Tools, References. Add a reference, save it the reference and then reboot.

Also try exporting all your objects into a new mdb. Has also worked for me in the past.

Craig
 
Hi

That seems to have fixed it (with test runs). Lets see how it goes for a full run, but I think you ave solved it

Thanks alot

All the best

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top