John Bartow
john at winhaven.net
Wed Sep 27 12:47:54 CDT 2006
Thanks Gustav, Since Events prior to this make sure the text box is not null there should never be a time when JobNumber's text box is null or I would defintetly use this. -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock If JobNumber is text, you need to wrap the value in single quotes. Also, if your textbox may be Null, and DefaultValue should be a String. Thus, try this: = "'" & Nz(DMax("[ItemNumber]", "tblJobDetail", "[JobNumber] = '" & [Forms]![frmProject]![txtJobNumber] & "'"), 0) + 1 & "'" /gustav