S
scott04
Hello,
I was just writing some code to make sure agents are entering required
fields. Please see below as an example. After some thinking i was wondering
if it would be easier to have the message box states all of the fields that
are null rather than going one by one. How would that be written? So my
message box would state something like
Please enter the following
*case number
*plaintiff's name
ect....
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strPE As String
strPE = "Please enter the "
f IsNull(Me.Case_No) Then
MsgBox strPE & "case number", vbCritical
Cancel = True
Case_No.SetFocus
ElseIf IsNull(Me.Plaintiff_s_Name) Then
MsgBox strPE & "plaintiff's name", vbCritical
Cancel = True
Plaintiff_s_Name.SetFocus
Ect....
Thank you.
I was just writing some code to make sure agents are entering required
fields. Please see below as an example. After some thinking i was wondering
if it would be easier to have the message box states all of the fields that
are null rather than going one by one. How would that be written? So my
message box would state something like
Please enter the following
*case number
*plaintiff's name
ect....
Private Sub Form_BeforeUpdate(Cancel As Integer)
Dim strPE As String
strPE = "Please enter the "
f IsNull(Me.Case_No) Then
MsgBox strPE & "case number", vbCritical
Cancel = True
Case_No.SetFocus
ElseIf IsNull(Me.Plaintiff_s_Name) Then
MsgBox strPE & "plaintiff's name", vbCritical
Cancel = True
Plaintiff_s_Name.SetFocus
Ect....
Thank you.