paulnnosh
MIS
- Mar 25, 2004
- 32
Hi,
I have a table called Accounts and a table called Contacts. There are many contacts for each account so I would like a combo box with the Account names (selected from the Account Table) to populate a subform.
All the data to be viewed is to be read only.
I have created a form created an unbound combo box with a Row Source selecting all the Accounts on the Account table.
I have inserted a subform and I have set the Record Source of the subfor to be
SELECT Contacts.Account, Contacts.ContactName, Contacts.ContactTel, Contacts.ContactMob, Contacts.ContactEmail FROM Contacts
WHERE (((Contacts.Account)=Forms!Contacts!cboAccount));
This appears to be OK for the first entry but the data in the sub form does not change when I change the value in the combo box.
What am I doing wrong?
Thanks
I have a table called Accounts and a table called Contacts. There are many contacts for each account so I would like a combo box with the Account names (selected from the Account Table) to populate a subform.
All the data to be viewed is to be read only.
I have created a form created an unbound combo box with a Row Source selecting all the Accounts on the Account table.
I have inserted a subform and I have set the Record Source of the subfor to be
SELECT Contacts.Account, Contacts.ContactName, Contacts.ContactTel, Contacts.ContactMob, Contacts.ContactEmail FROM Contacts
WHERE (((Contacts.Account)=Forms!Contacts!cboAccount));
This appears to be OK for the first entry but the data in the sub form does not change when I change the value in the combo box.
What am I doing wrong?
Thanks