Hi -
Subforms are contained in sub-form controls, which have properties just like
any other control. One of these properties is "Name" - the name of the
control. Another property is "Source Object", which specifies what form is
in that control.
When you add a sub-form to a form (using the wizard), it will ask you to
select the form you want to use as a sub-form, and it will then ask you "What
name would you like for your sub-form or sub-report?". The response you give
here is the name of the *control*, which can be the same as the name of the
form *in* the control, but does not have to be.
Suppose your main form is MyMainForm, the subform *control* name is
SubFormControl, the form in the control is MySubForm, on whic is a textbox
called Text1.
To refer to the textbox Text1 from code on the main form, you would use:
Me![SubformControl].form![Text1]
Note that the sub-form name - MySubform - is not in the reference.
Does that help - I hope? I know, it is confusing, I went through it too!
John
I feel reall dumb asking this but your comment "where SubformControl is the
name of the control containing the subform, NOT the name of the subform
itself."
"Control Containing the Subform"??
I'm not sure what the difference is!!
Private Sub TR_ACKNOWLTR_AfterUpdate()
If Me.TR_ACKNOWLTR <> " " Then
Me!frmCaseLog.Form!CA_NAME.RowSource = "Select * from tblCommitteeName where
[C_Committee] = 'CG'or 'IR'"
Me!frmCaseLog.Form!CA_NAME.Requery
End If
End Sub
Thanks
When do you expect this event to happen? A user entering a date in a text
box will not cause the GotFocus event to happen unless 1) the combo box is a
[quoted text clipped - 31 lines]