Darren DICK
darrend at nimble.com.au
Wed Sep 27 00:36:47 CDT 2006
Hi John When dealing with numbers the syntax you provided is correct - however JobNumber is actually text so in the Domain Lookup syntax (DMAX) it should be treated as text EG - try =(DMax("[ItemNumber]","tblJobDetail","[JobNumber] = [Forms]![frmProject]![txtJobNumber]"))+1 IE = [Forms]![frmProject]![txtJobNumber] now sits INSIDE the double quotes rather than outside as in your posted syntax Hope this helps Darren ------------------ T: 0424 696 433 -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Wednesday, 27 September 2006 2:36 PM To: _DBA-Access Subject: [AccessD] DMax issue This must be something I'm simply not seeing. Why doesn't this work as the default value for a textbox on a popup form? = (DMax("[ItemNumber]", "tblJobDetail", "[JobNumber] = " & [Forms]![frmProject]![txtJobNumber])) + 1 ItemNumber is Integer JobNumber is Text TIA John B. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com