So, in the form design view I hightlight the textbox, right click, properties,
when what?
Actually, don't deal with the textbox at all. Instead, click the little square
at the upper left intersection of the rulers to select the Form's properties.
On the Events tab find the BeforeInsert event. Click the ... icon by it and
choose "Code Builder". Access will give you the Sub and End Sub lines; just
add one more -
Private Sub Form_BeforeInsert(Cancel as Integer)
Me.txtID = NZ(DMax("[ID]", "[tablename]")) + 1
End Sub
For txtID use the name of a control on the form bound to the field you want
incremented; for ID use that fieldname; for tablename use the actual name of
your table.
Select Debug... Compile <my database name> from the menu; post back if it
gives you an error. Otherwise you should be good to go.
John W. Vinson [MVP]