D
Darrell
My purpose is to give the user an unmistakable sign when they have opened a
form in Data Entry mode by changing the back color of the form and all
subforms. Rather than hard coding the name of each subform, I would like to
loop through the controls of the main form and if they are subforms, change
their back color (having determined that the form is in Data Entry mode, of
course).
This is the code I have tried so far:
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is SubForm Then
'Forms!frmTape!subfrmTapeProcedure.Form.Section(acDetail).BackColor = 9211609
'Me.Controls(ctl.Name).Form.Section(acDetail).BackColor =
9211609
End If
Next ctl
Can someone enlighten me as to what the syntax should be, or how else I
should attack this?
form in Data Entry mode by changing the back color of the form and all
subforms. Rather than hard coding the name of each subform, I would like to
loop through the controls of the main form and if they are subforms, change
their back color (having determined that the form is in Data Entry mode, of
course).
This is the code I have tried so far:
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is SubForm Then
'Forms!frmTape!subfrmTapeProcedure.Form.Section(acDetail).BackColor = 9211609
'Me.Controls(ctl.Name).Form.Section(acDetail).BackColor =
9211609
End If
Next ctl
Can someone enlighten me as to what the syntax should be, or how else I
should attack this?