On a form (bound to the table 'Passenger')in Data Entry mode, I would like to have a text box bound to the primary key, automatically generate a default value. The primary key is an ID number, which is simply one greater than the previous entry.
I've attempted several things.
I've placed this query
Count(SELECT * FROM Passenger)
into the 'Default Value' field of the box's Properties, but in Form View the string '#Name?' is all that appears. I've futzed around with some VBA code (of which I know next to nothing) and various permutations of the query.
Can someone help me get this Default Value thing going? Thanks!
I've attempted several things.
I've placed this query
Count(SELECT * FROM Passenger)
into the 'Default Value' field of the box's Properties, but in Form View the string '#Name?' is all that appears. I've futzed around with some VBA code (of which I know next to nothing) and various permutations of the query.
Can someone help me get this Default Value thing going? Thanks!