BabyPowder2u
Programmer
I want to use a sub to verify entry of required fields, if it fails I want to exit the main sub.
All the fields mentioned in the check_Required are on the form.
I am getting a "compile error: Expected Function or Variable"
on the "AllRequired = check_Required" line
my code is:
Private Sub cmdScheduleRequest_Click()
Dim AllRequired As Boolean
AllRequired = check_Required
If Not AllRequired Then Exit Sub
.
.
.
End sub
Sub check_Required()
Dim AllRequired As Boolean
If "((IsNull(cboDtSubmitted)) or (IsNull(cboSubPOC)) " & _
"or (IsNull(cboStartDate1)) or (IsNull(cboStartHour1)) or (IsNull(cboEndDate1)) " & _
"or (isnull(cboEndHour1)))" Then
AllRequired = False
Else
AllRequired = True
End If
End Sub
Can someone please help me understand what I've done wrong?
Thanks,
T
All the fields mentioned in the check_Required are on the form.
I am getting a "compile error: Expected Function or Variable"
on the "AllRequired = check_Required" line
my code is:
Private Sub cmdScheduleRequest_Click()
Dim AllRequired As Boolean
AllRequired = check_Required
If Not AllRequired Then Exit Sub
.
.
.
End sub
Sub check_Required()
Dim AllRequired As Boolean
If "((IsNull(cboDtSubmitted)) or (IsNull(cboSubPOC)) " & _
"or (IsNull(cboStartDate1)) or (IsNull(cboStartHour1)) or (IsNull(cboEndDate1)) " & _
"or (isnull(cboEndHour1)))" Then
AllRequired = False
Else
AllRequired = True
End If
End Sub
Can someone please help me understand what I've done wrong?
Thanks,
T