A
Andy
Access 97.
I have a form with a subform (continuous forms).
I want to step through the subforms checking that the data entered is
acceptable.
I have tried a number of format of code including
Set frm = Forms("frmAssignLCN").Form("frmAssignLCN Subform")
For Each ctrl In frm.Controls
also
For Each frmSubForm In Application.Forms("frmAssignLCN")
Debug.Print frmSubForm.Name
If Forms![frmAssignLCN]![Subtable].Form![LCN] = "" Then
MsgBox "An LCN has been left blank", vbOKOnly, "Data Validation Error"
fValidate_formAssignLCN = False
End If
the latter only check the first subform in the continuous form, the former
gives a "Can't find field" error.
Any ideas, I'm stuck and I think that I have exhausted the help file.
Many Thanks as always.
Andy
I have a form with a subform (continuous forms).
I want to step through the subforms checking that the data entered is
acceptable.
I have tried a number of format of code including
Set frm = Forms("frmAssignLCN").Form("frmAssignLCN Subform")
For Each ctrl In frm.Controls
also
For Each frmSubForm In Application.Forms("frmAssignLCN")
Debug.Print frmSubForm.Name
If Forms![frmAssignLCN]![Subtable].Form![LCN] = "" Then
MsgBox "An LCN has been left blank", vbOKOnly, "Data Validation Error"
fValidate_formAssignLCN = False
End If
the latter only check the first subform in the continuous form, the former
gives a "Can't find field" error.
Any ideas, I'm stuck and I think that I have exhausted the help file.
Many Thanks as always.
Andy