I had a bound form for users to enter data. After data had already been entered I change it to unBound to allow users to cancel changes.
I added the code below to btnSave. For some reason the .AddNew has started somewhere in the lower number ranges. It will add if it happens to find a gap in the AutoNumbers, but I need it to start grabbing the last AutoID plus one. I have tried compact repairs on both the front and back ends but nothing seems to be working.
Dim rst As DAO.Recordset
Dim strSQL As String
Dim intLoop As Integer
Dim fld As DAO.Field
Set rst = CurrentDb.OpenRecordset("Select * From tblIntakeForms Where IntakeFormID = " & Nz(IntakeFormID, 0))
If Nz(IntakeFormID, 0) > 0 Then
For Each fld In rst.Fields
If fld.Name <> "IntakeFormID" Then rst(fld.Name) = Me(fld.Name).Value
If Nz(Me.IntakeFormID, 0) = 0 Then rst!AddedBy = GetCurrentUserName()
Me.IntakeFormID = rst!IntakeFormID
Set rst = Nothing