Restrict values in combo via subform

  • Thread starter Thread starter Piers 2k
  • Start date Start date
P

Piers 2k

Hi folks,

Main form - Customers
Subform - Contact History (with appropriate link - all OK).
On subform there is a combo populated from a third table called Contacts.
This has a list of all contacts in a company (linked via CustID).
I need the combo to filter down and display only the Names for the current
Customer being viewed.

I've added in [txtCustID] into the Row Source of the combo, and it works
fine for the first record, but after changing records, it doesn't seem to
update.

Any ideas?

TIA<
Piers
 
In order to keep the combo "in synch" with your subform customer field,
you'll need 2 coded events.
On the OnCurrent event for each form...
cboCustomer.Requery
and
On the AfterUpdate event of Customer...
cboCustomer.Requery

Now, as you come into each subform record the combo will resync, and if you
happen to enter or change Customer on a record it will also sync.
hth
Al Camp
 
Back
Top