S
SoggyCashew
Hello, Im using a Public Function to verify data on a forms close. One of the
data criterias that needs to have a choice or radio button selected is an
option group "optClassicficationGroup". I want a msgbox to come up and set
focus to the option group if a radio isnt selected. What am I missing in my
code? Thanks!
Public Function VerifyValidation()
Dim frm As Form
Set frm = Forms!AccidentEntry
If frm!txtRootCause = "" Or IsNull(frm!txtRootCause) Then
MsgBox "You Must enter a root cause before proceeding! ", vbCritical,
"Selection Error"
frm!txtRootCause.SetFocus
End If
Exit Function
If Nz(frm!optClassicficationGroup.Value, 0) > 0 Then
MsgBox "You Must enter a Classification before proceeding! ",
vbCritical, "Selection Error"
frm!optClassicficationGroup.SetFocus
Else
MsgBox "your good to go"
End If
End Function
data criterias that needs to have a choice or radio button selected is an
option group "optClassicficationGroup". I want a msgbox to come up and set
focus to the option group if a radio isnt selected. What am I missing in my
code? Thanks!
Public Function VerifyValidation()
Dim frm As Form
Set frm = Forms!AccidentEntry
If frm!txtRootCause = "" Or IsNull(frm!txtRootCause) Then
MsgBox "You Must enter a root cause before proceeding! ", vbCritical,
"Selection Error"
frm!txtRootCause.SetFocus
End If
Exit Function
If Nz(frm!optClassicficationGroup.Value, 0) > 0 Then
MsgBox "You Must enter a Classification before proceeding! ",
vbCritical, "Selection Error"
frm!optClassicficationGroup.SetFocus
Else
MsgBox "your good to go"
End If
End Function