A
Art M
I have code to Eval fieds in a Form. This works great.
I tried here to add an eval for a Subform... and i get an error message
Access can't find it.
Is it becasue of the bloody space in the Form name? or is there something
different I have to do to eval a subform?
Here is the code: (The first two evals work great)
Private Sub Close_Click()
On Error GoTo Err_Close_Click
If
(Eval("[Forms]![Data_Entry_Form_Update_Incidents_All]![Regional_Approval_Date] Is Null")) Then
MsgBox "The General Manager must approve before this Incident can be
Closed", vbOKOnly, "More Data Needed"
Else
End If
If (Eval("[Forms]![Data_Entry_Form_Update_Incidents_All]![System_Approval]
Is Null")) Then
MsgBox "The System Control General Manager must approve before this
Incident can be Closed", vbOKOnly, "More Data Needed"
Else
End If
If ((Eval("[Forms]![ActionItem1 Subform]![Due_Date_1] Is NotNull")) And
(Eval("[Forms]![ActionItem1 Subform]![Completed_Date] Is Null"))) Then
MsgBox "Action Items must be Complete before this Incident can be
CLOSED", vbOKOnly, "Action Items Open"
Else
End If
stDocName = "Status_Update_Query"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Close_Click:
Exit Sub
Err_Close_Click:
MsgBox Err.Description
Resume Exit_Close_Click
End Sub
I tried here to add an eval for a Subform... and i get an error message
Access can't find it.
Is it becasue of the bloody space in the Form name? or is there something
different I have to do to eval a subform?
Here is the code: (The first two evals work great)
Private Sub Close_Click()
On Error GoTo Err_Close_Click
If
(Eval("[Forms]![Data_Entry_Form_Update_Incidents_All]![Regional_Approval_Date] Is Null")) Then
MsgBox "The General Manager must approve before this Incident can be
Closed", vbOKOnly, "More Data Needed"
Else
End If
If (Eval("[Forms]![Data_Entry_Form_Update_Incidents_All]![System_Approval]
Is Null")) Then
MsgBox "The System Control General Manager must approve before this
Incident can be Closed", vbOKOnly, "More Data Needed"
Else
End If
If ((Eval("[Forms]![ActionItem1 Subform]![Due_Date_1] Is NotNull")) And
(Eval("[Forms]![ActionItem1 Subform]![Completed_Date] Is Null"))) Then
MsgBox "Action Items must be Complete before this Incident can be
CLOSED", vbOKOnly, "Action Items Open"
Else
End If
stDocName = "Status_Update_Query"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Exit_Close_Click:
Exit Sub
Err_Close_Click:
MsgBox Err.Description
Resume Exit_Close_Click
End Sub