Why not just add a 'splash screen' at the startup that asks them for the
date first (or whatever criteria you want), then have it start a new record
(DoCmd.GoToRecord, acNew) on your current form. If the user cancels (the
startup form, that is), then the record isn't made.
Jeff's right here: you can't create a record ID without first creating a
record. Instead of changing the user (a frustrating and often fruitless
task) way of doing things, force the users to do it your way.
When they save, have the form close, and reload the startup form.
Another thing you can *try* (I stress this for reasons made clear below) you
can try this code:
Private Sub Command2_Click()
Dim LastID As Integer
'=== get last system ID
LastID = GetLastSystemID
'=== fill text box
Me.Text_LastNum = LastID
'=== increase system ID and fill text box
Me.Text_NewNum = LastID + 1
MsgBox "Done"
End Sub
This takes whatever is the last Autonumber created and adds 1 to it. You can
use that in source on your table as well. *However* it also will add
regardless of whether a record is made, causing lots of problems with
records that have a 'LastID' (variable in code above) and no other
information. We just use it on two-person database to increment a Computer
System's ID so we can sort it in other areas. A table full of blank rows is
*very* disturbing, let me tell you, and it will cause trouble if you ever do
a combo box to lookup records in the table.
HTH-
Gary