Limit records in Combo box

S

Sandra

I have a tabbed form for Master table.
Page 1 - Main form for Master table.
Page 2 - Subform to add Relations linked to Master.
Page 3 - Subform to add Donations linked to Master.

In the Donations form I have a combo box to select a
Relation linked to the current record of the Master table
on Page 1, but the relations list in the combo box always
shows the records linked to the first Master record in
the table, rather than the list of records linked to the
current Master record on Page 1.

Or, when I tried it another way, I get the entire list of
Relations, and not just the list filtered to the current
Master record.

Master table:
PPID - PK for each record

Relations table:
RID - PK for each record
RPPID - link to Master record PPID

Donations Table:
DID - PK for each record
PPID - link to Master record PPID
RID - link to Relations table

How do I get this combo box to work?

TIA,
Sandra
 
J

Jeff Boyce

Sandra

You mention having subforms, but don't mention if/how they are linked to the
main form. There should be parent/child fields in the properties of each
subform that will allow you to designate the fields from the main and sub
forms that are to be used. Does your form have these?

When you select a new main form record via your combo box, do you "requery"?
If your subforms are linked as above, you should need to -- Access handles
this, showing the related subform records for each main form record. If the
subforms are not linked correctly, you might be able to see related subform
records by requerying the subform controls in the AfterUpdate event of the
combo box.
 

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