I'm sure this is simple and it works on another app I have, but this app - when I code: DoCmd.OpenForm "frm_Household_Inventory", acAdd, "", "", acFormAdd, acNormal
The ID is an autonum field, and when the form opens the autonum increases to the new number (30) although when I look in the table that last number used was 23. I have a cancel button that has:
'DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70 (commented out because it made no difference)
DoCmd.Close
I have the same code in another form that leaves the autonum field as (AutoNumber) until I click in the first field that has focus. In both forms if I click ESC the fields clear and the autonum field shows (AutoNumber).
This isn't a hugh deal, but while testing I'm getting the numbers totally out of whack. Any ideas?
The ID is an autonum field, and when the form opens the autonum increases to the new number (30) although when I look in the table that last number used was 23. I have a cancel button that has:
'DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70 (commented out because it made no difference)
DoCmd.Close
I have the same code in another form that leaves the autonum field as (AutoNumber) until I click in the first field that has focus. In both forms if I click ESC the fields clear and the autonum field shows (AutoNumber).
This isn't a hugh deal, but while testing I'm getting the numbers totally out of whack. Any ideas?