So the first combo box should have the record source SELECT CusName,
CustomerID FROM Customer ORDER BY CustomerName
2 Columns widths say 3cm, 0cm , Bound Column 2 Name CusIDRelay, Not Bound
Assuming the form is based on a query based on the 2 tables (I assume you
have set up a relationship between them) then you need an Event On Update
Sub CusIDRelay_AfterUpdate()
DoCmd.GoToControl "CustomerID"
DoCmd.FindRecord CusIDRelay
End Sub
The second ComboBox should have the recordsource something like
SELECT AddLine1, Town, AddressID
FROM Address
WHERE CustomerID = forms!Customer!CustomerID
ORDER BY AddLine1;
3 Columns widths say 3cm, 3cm, 0cm , Bound Column 3 Name AddIDRelay, again
not bound
similar bit of code
Sub AddIDRelay_AfterUpdate()
DoCmd.GoToControl "AddressID"
DoCmd.FindRecord AddIDRelay
End Sub
Hope this helps
Phil
"Carolyn" <ca***********@nscorp.comwrote in message
news:11*********************@o5g2000hsb.googlegrou ps.com...
On Apr 4, 10:29 am, "Phil Stanton" <p...@stantonfamily.co.ukwrote:
>Can you confirm that you have 1 table containing at least
CustomerID
CusName
and a second table containing at least
AddressID
AddLine1
AddLine2
AddLine3
Town
County
PostCode
CustomerID
& probably HeadOffice (True or false)
If so not too difficult
"Carolyn" <carolyn.ev...@nscorp.comwrote in message
news:11**********************@l77g2000hsb.googleg roups.com...
>I am new to usingAccessand am trying to populate a listbox based on
another listbox. My first box has the name of various customers. I
have another listbox that populates the service location. This works
fine most of the time. The problem is, one of the customers has
multiple sites. I am not allowed towriteoverthe service location
and do not want to list the customer more than once in the customer
box. Does someone have a way to help me with this problem?
Thanks,
Carolyn- Hide quoted text -
- Show quoted text -
Yes. I do have 2 tables that contain that information.