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

Undefined function error 1

Status
Not open for further replies.

surotkin

Programmer
Dec 10, 2003
103
CA
Hi everyone,
I have a select query:
“SELECT Claims.CustomerLastName AS [Last Name], Claims.CustomerFirstName AS [First Name], Format([CustomerPostalCode],">@@@ @@@") AS [Postal Code] FROM Claims Where ( [Claims].[CustomerLastName] Like "smith") ORDER BY Claims.CustomerLastName ASC;

When I try to execute the query, MS Access 2002 gives error message “Undefined function ‘Format’ in expression.”
I try to execute the same query in a backup copy of the same database. It works fine.
I have checked the References. The current and the backup databases have the same references.

Does anybody have any ideas?

Thanks,
Surotkin
 
Hi

You say "I try to execute the same query in a backup copy of the same database."

is this on the same PC as the original problem?

I have seen this error occur on PC's with more tahn one version of Access (or Office) installed, particularly if the Microsoft advice to install versions in chronolical sequence has not been followed

Could this be you problem?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
This is almost always a references issue. I would suggest you check them again and possible uncheck and check the non-standard ones. Then attempt to compile all your code.

As a WAG, make sure all your records contain a CustomerPostalCode value.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi Ken Reay and dhookom,
thanks for responses.

Ken Reay,
1) yes, it was on one PC.
2) no, the PC has only one version of MS Office installed.

Dhookom,
I tried your suggestion - I unchecked and checked again one of non-standard libraries (as an experiment I have found that it doesn't matter which of non-standard library you uncheck and check again - the result is the same), then compiled all the code. It works!!!

Thank you very much!
surotkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top