hi
@smtazulislam,
What did you click on to get that message?
Command37 goes to a new record *
What is the CAPTION on the command button for Command38 ?
convert away from DoMenuItem! That was what wizard code created that was shipped with Access version 2.0! they still work, but they're pretty cryptic. I'd be surprised if anyone really knows them all! What is the caption for the button (since the name isn't helpful?)
* It is a good idea before changing to a different (or new) record, to always save current record if changes have been made. If it can't be saved, then whatever if preventing the save needs to be undone or you need to address the reason. Could it be that you have a default value of 0 for a numeric foreign key that isn't filled (0 won't probably be valid)? Not sure which procedure is giving the problem.
instead of
DoCmd.DoMenuItem ...
use
DoCmd.RunCommand ...
or something more modern.