The difficult I do immediately, the impossible takes a little bit longer.
Function frmValidateData() As Boolean
Place the below in your modUtilities or in a new Module, remembering not to name the Module the same as the Function, and save. To use...
1. On every control on your Form you want to be filled before saving or going to a new record place *require* (no asterisks) on Tag line in the Properties Window of said field(s). To use...
If frmValidateData Then
intResp = MsgBox("Your Question?", vbYesNo + vbQuestion, "Your Title?")
If intResp = vbYes Then
Call LogChange(Me.txtID, "frmYourForm", "Your Note of What Was Done.")
strSQL = "UPDATE tblYourTable SET ytYourField = 5 WHERE rID = " & Me.txtID
CurrentDb.Execute strSQL, dbFailOnError
DoCmd.SelectObject acReport, "YourReport", True
DoCmd.PrintOut , , , , 2
The code will not execute if the ALL the fields tagged *require* are not filled in. Instead you will get a message telling which fields are not filled in.