James,
Main/Sub form construct is conventionally used to display one-to-many or
one-to-one relationships. OK, your main form may have a bound recordset
with
many rows but normally you display these one at a time on a single form.
The
link fields tell Access which values to use in synchronising the subform,
the
LinkMaster field being the one on the main form and the LinkChild field
being
the one on the subform. Properly specified Access will do all the hard
work
in synchronising the sub form as you step forwards and backwards through
your
main form recordset, filtered or not.
There are exceptions to the foregoing, particularly where the main form
may
be a list and the subform displays further details about the highlighted
row.
Even here Access will synchronise as you move up and down or refilter the
list.
However from your description it sounds as though you are using two
continuous forms (?), based on the same table (?) and expect a filter
applied
to the one to affect the other.
If you really need to do this forget about using the link fields; it
simply
won't work. You need to address and alter the properties of the subform
to
match the properties of the main form and then (possibly) issue a requery
command for the subform.
To address the subform from within your main form use something like the
following.
Me![MySubFormControl].Form.<property>
Me![MySubFormControl].Form![MyControl]
The first accesses the subform property and the second accesses the
subform's controls.
Rod
JamesJ said:
I'm trying to filter a subform to display the same records as the main
form but I'm not having much luck, apparently referring to the subform.
Not sure how to Link Master and Child fields. I'm using another table
to display 2 values in a cbo which the selection of filters the records.
The records get filtered in the main form but not in the subform.
Both are based on the same table. The lookup field is ReminderTypeID and
the Primary key is ReminderID
Any help will be appreciated,
James