Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[blue] Dim Msg As String, Style As Integer, Title As String
Dim DL As String, Ctl As Control
DL = vbNewLine & vbNewLine
For Each Ctl In Me.Controls
If Ctl.Tag = "?" And IsNull(Ctl) Then
Msg = "'" & Ctl.Name & "' is Required before Saving!" & DL & _
"Go back and enter a value" & DL & _
" or" & DL & _
"Hit 'ESC' to Abort Saving . . ."
Style = vbInformation + vbOKOnly
Title = "Required Data Error! . . ."
MsgBox Msg, Style, Title
Ctl.SetFocus
Cancel = True
End If
Next[/blue]
If IsEmpty(Name1) = False Then
Contract1.Tag = "?"
GCCM1.Tag = "?"
DateCompleted1.Tag = "?"
End If
[blue] Dim Msg As String, Style As Integer, Title As String
Dim DL As String, Ctl As Control
DL = vbNewLine & vbNewLine
[purple][b]If Trim(Me!Name1 & "") = "" Then[/b][/purple]
For Each Ctl In Me.Controls
If Ctl.Tag = "?" And IsNull(Ctl) Then
Msg = "'" & Ctl.Name & "' is Required before Saving!" & DL & _
"Go back and enter a value" & DL & _
" or" & DL & _
"Hit 'ESC' to Abort Saving . . ."
Style = vbInformation + vbOKOnly
Title = "Required Data Error! . . ."
MsgBox Msg, Style, Title
Ctl.SetFocus
Cancel = True
End If
Next
[purple][b]End If[/b][/purple][/blue]
[blue] If Trim(Me!Name1 & "") = "" Then
For Each Ctl In Me.Controls
If Ctl.Tag = "?" And IsNull(Ctl) Then
Msg = "'" & Ctl.Name & "' is Required before Saving!" & DL & _
"Go back and enter a value" & DL & _
" or" & DL & _
"Hit 'ESC' to Abort Saving . . ."
Style = vbInformation + vbOKOnly
Title = "Required Data Error! . . ."
MsgBox Msg, Style, Title
Ctl.SetFocus
Cancel = True
[purple][b]Exit For[/b][/purple]
End If
Next
End If[/blue]
[blue] Dim Msg As String, Style As Integer, Title As String
Dim DL As String, Ctl As Control, MsgAns As Integer
DL = vbNewLine & vbNewLine
If Trim(Me!Name1 & "") = "" Then
Msg = "'Name1' is a required field and can't be empty!"
Style = vbInformation + vbOKOnly
Title = "Validation Error! . . ."
MsgBox Msg, Style, Title
Me!name1.SetFocus
Cancel = True
Else
Msg = "Click 'Yes' to Perform Full Validation" & DL & _
"Click 'No' to Perform Partial Validation" & DL & _
"Click 'Cancel' to Abort Saving"
Style = vbQuestion + vbDefaultButton1 + vbYesNoCancel
Title = "User Action Required! . . ."
MsgAns = MsgBox(Msg, Style, Title)
If MsgAns = vbYes Then
For Each Ctl In Me.Controls
If Ctl.Tag = "?" And IsNull(Ctl) Then
Msg = "'" & Ctl.Name & "' is Required before Saving!" & DL & _
"Go back and enter a value" & DL & _
" or" & DL & _
"Hit 'ESC' to Abort Saving . . ."
Style = vbInformation + vbOKOnly
Title = "Required Data Error! . . ."
MsgBox Msg, Style, Title
Ctl.SetFocus
Cancel = True
Exit For
End If
Next
ElseIf MsgAns = vbCancel Then
Cancel = True
End If
End If
End Sub[/blue]