Beach Access Software
bchacc at san.rr.com
Wed Sep 27 00:29:25 CDT 2006
John Wouldn't you need Val([Forms]![frmProject]![txtJobNumber]))) + 1? Maybe [Forms]![frmProject]![txtJobNumber])) is evaluating to 0 or null because it's text? I'd put a statement right before the DMax: MsgBox "*" & [Forms]![frmProject]![txtJobNumber])) & "*" just to see what that snip is evaluating to. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow Sent: Tuesday, September 26, 2006 9: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 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.12.9/457 - Release Date: 9/26/2006