Charlotte Foust
cfoust at infostatsystems.com
Mon Mar 20 11:41:51 CST 2006
Put the value with numbers at the front in square brackets, same as you would for a name with a space in it, and see if that makes a difference. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bob Heygood Sent: Monday, March 20, 2006 9:26 AM To: Access Developers discussion and problem solving Subject: [AccessD] numbers in DLookup 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com