G
Guest
I have a function that receives a "Form" variable and loops through the
form's controls to make sure they're valid before moving on. I also want to
validate the controls on the form's sub form if a sub form exists. How do I
reference a form's sub form as a variable. A sample of my code is below:
*******************************************
For Each ctl In frm.Controls
If ctl.ControlType = acSubform And ctl.Tag = "!" Then
If
validate_the_form(Forms!frm_project_detail.frm_sub_resource.Form) = False Then
validate = False
Exit For
End If
End If
Next ctl
*************************************************
Whilst this routine works fine. How do I replace the
"Forms!frm_project_detail.frm_sub_resource.Form" with a variable that handles
all subforms on a form.
Thanks in advance.
Ian
form's controls to make sure they're valid before moving on. I also want to
validate the controls on the form's sub form if a sub form exists. How do I
reference a form's sub form as a variable. A sample of my code is below:
*******************************************
For Each ctl In frm.Controls
If ctl.ControlType = acSubform And ctl.Tag = "!" Then
If
validate_the_form(Forms!frm_project_detail.frm_sub_resource.Form) = False Then
validate = False
Exit For
End If
End If
Next ctl
*************************************************
Whilst this routine works fine. How do I replace the
"Forms!frm_project_detail.frm_sub_resource.Form" with a variable that handles
all subforms on a form.
Thanks in advance.
Ian