[AccessD] numbers in DLookup

Bob Heygood bheygood at abestsystems.com
Mon Mar 20 11:26:11 CST 2006


Hello to the list!
I am trying to use a DLookup function in some code.
It uses two string variable values for the Expr and the Domain arguments.
And a third string variable for the part of the Where clause.

This works fine until the value of the Expr string contains digits anywhere
but at the end of the string. Hard to believe, but when I remove the records
from the table from which I derive the string, works fine. But if I leave in
those records that contain a one or more digits except at the end, it give
the error message:

Syntax error(missing operator) in query expression '2004TotalTurnoverED207'.

Sure enough, 2004TotalTurnoverED207 is the correct value.
Other values such as TotalHours, TotalMan201 and AveUnits45 all work fine in
the DLookup as values for the Expr, just not when the digits occur anywhere
but at the end of the string.

Any help would prevent further head banging.

TIA

bob





More information about the AccessD mailing list