| | |
|
|
|
Changing Sub Form RowSource |
| message from Dave Ruhl on 12 May 2004 |
Hello, I'm trying to change the RowSource of an un-linked
subform based on search criteria entered on the main
form. The main form uses the criteria to show the
results in one format, the subform shows it in another
format.
I've tried variations of Forms!frmMain!frmSub.RowSource
and Me.frmSub.RowSource, but the syntax is not correct.
Can someone show me the correct mwthod ? Thanks
(Access 2002/ Windows XP)
|
| Douglas J. Steele replied to Dave Ruhl on 12 May 2004 |
There are two names involved: the name of the control on the main form that
holds the subform, and the name of the subform itself. By default, these
will be the same when you drag-and-drop one form onto another: I
deliberately rename the subcontrol "container" just to avoid problems.
Assuming frmSub is the name of the control that's holding your subform, try:
Forms!frmMain!frmSub.Form.RowSource
|
| Dave Ruhl replied to Douglas J. Steele on 12 May 2004 |
Thanks !!!
Doug, thanks for giving me the syntax hint I needed, and
Hugh, thanks for pointing out that I was using the
wrong 'source'.
Both tips helped, and it works perfectly now. Thanks
again !
the main form that
By default, these
another: I
avoid problems.
holding your subform, try:
linked
|
| Hugh Horton replied to Douglas J. Steele on 12 May 2004 |
I think the problem is that a form has a RecordSource,
not a RowSource.
the main form that
By default, these
another: I
avoid problems.
holding your subform, try:
linked
|
|
Archived message: Changing Sub Form RowSource (MS Access)