I have a few forms for adding data where I have and OK cmd button and a Cancel cmd button. On the OK cmd button,if there has been no data added I would like a msgbox to appear (Please complete the job record... or something along those lines). The code I have is as follows:
Expand|Select|Wrap|Line Numbers
- If Me.Dirty = False Then
- MsgBox ("Please enter the details for this job."), vbExclamation, "Missing Data"
- ElseIf Me.Dirty = True Then
- 'Save new property details.
- DoCmd.Save
- DoCmd.Close acForm, "frm_newJob", acSaveYes
- End If
Expand|Select|Wrap|Line Numbers
- If Me.Details is null Then
- MsgBox ("Please enter the details for this job."), vbExclamation, "Missing Data" ....etc
Any Idea would be great, Many Thanks
Jane