I have a data entry form used to enter new customers recod in Access 2007. When opened after user types any character in any field access assigns a ID in a auto number field. If the user changes their mind they can press esc, to undo form, but if the user closes the form a incomplete record is saved. I would like to Prompt the user with a message box OKCancel Buttons that if Firstname or Lastname is null "The Firstname and Lastname must be entered" if vbOk SetFocus Firstname or vbCancel =undo record.
I would appreciate help with msgbox code