Filter subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a main form called [frmGrants] which has a command button that opens a
popup form called [frmNewdirector]. The [frmGrants] form is linked to the
Grants table and the frmNewDirector is linked to the NewDirector table. The
frmGrants and frmNewDirector are linked using VB code by the [CID] field
which is in both forms. So when the user adds a new director in the
[frmNewDirector] form, it assigns the CID from the frmGrants field to the new
record created in the NewDirector table. This all works fine.

Here's where I'm having difficulty. On the [frmNewDirector] form I also
have a sub form called [subfrmDirectorHistory] which also has a [CID] field.
The [SubfrmDirectorHistory] is linked to the same table as the
[frmNewDirector] form except that it is a continous form and
the[frmNewDirector] is not.

I do not want to link the [subfrmDirectorHistory] form with the
[frmNewDirector] form using "Link Child" and "Link Master". Instead I want
to filter /synchronize the records in the [subfrmDirectorHistory] form with
the [frmGrants] form using the [CID] fields on both forms.

I'm sure this can be done, however I am getting confused in referring to the
forms when I try to write the syntax for the filter. Any assistance would be
greatly appreciated. Thanks.

Dingo
Dallas, TX
 
Hi Dingo,

Update the query in your subform to filter on the CID field on the frmGrants
form.

If you can also add a new record with your subform, remember to pick up the
CID field for the frmGrants form when you start a new record (use it as the
default value is a good way to go).

Hope this helps.

Damian.
 
Back
Top