Filter subform

D

Dingo

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
 
D

Damian S

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top