I hope This isnt to simple for this group but....
I am new to access and just finished a product. I added this code
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strMsg As String
strMsg = "Data has changed."
strMsg = strMsg & "@Do you wish to save the changes?"
strMsg = strMsg & "@Click Yes to Save or No to Discard changes."
If MsgBox(strMsg, vbQuestion + vbYesNo, "Save Record?") = vbYes
Then
'do nothing
Else
DoCmd.RunCommand acCmdUndo
on to my form to tell the users they were actually adding data. The
problem is, there are a few mandatory field in the table. If a user
dosent fill in these fields and closes the form, they dont get an
error that there is mandatory data missing, and the other information
is not saved. Is there something Im missing? is there a way to check
if the info is all there before I run this code?
Any help id greatly appricated.
Mike