Hello,
I am trying to create database and having a bit of a problem getting my head around it, its been a long time since I did anything in access.
I will outline the tables and what I want to display and hopefully someone can come up with a easy solution
Tables: Fields
Customer: ID, customerCode, customerName
Location: ID, locationCode, customerCode, address1, address2, address3, postCode.
Contacts: ID, customerCode, locationCode, contactName, email, telephone, fax.
Basically I have a form that shows the customerCode and customerName. I then want a combo box showing the locationCodes from Location table but only the ones that match the current records customerCode.
Then when I select a location from the drop down, I want it to list the company address and then a table of all the contacts linked to that location.
If I set up a 1 to many relationship from Customers to Locations linked by customerCode, I can make a subform showing all the locations for that company, but I want to only show the one that matches the combobox selection.
Then I need another subform that will show only the contacts for the selected location.
I had tried a few approaches but keep running into problems, so thought I would ask on here and see if theres a simple solution?
I had tried to create a query based on the current record and the value of the combo box then populate the location address subform from that, but not sure if this would update the table if a value was changed or would it just show the values in the fields, but not update if changed.
Hopefully someone will have an idea of how to sort this?
If you need any more information that I might have missed please ask..
Thanks in advance.
WildmanUK
I am trying to create database and having a bit of a problem getting my head around it, its been a long time since I did anything in access.
I will outline the tables and what I want to display and hopefully someone can come up with a easy solution

Tables: Fields
Customer: ID, customerCode, customerName
Location: ID, locationCode, customerCode, address1, address2, address3, postCode.
Contacts: ID, customerCode, locationCode, contactName, email, telephone, fax.
Basically I have a form that shows the customerCode and customerName. I then want a combo box showing the locationCodes from Location table but only the ones that match the current records customerCode.
Then when I select a location from the drop down, I want it to list the company address and then a table of all the contacts linked to that location.
If I set up a 1 to many relationship from Customers to Locations linked by customerCode, I can make a subform showing all the locations for that company, but I want to only show the one that matches the combobox selection.
Then I need another subform that will show only the contacts for the selected location.
I had tried a few approaches but keep running into problems, so thought I would ask on here and see if theres a simple solution?
I had tried to create a query based on the current record and the value of the combo box then populate the location address subform from that, but not sure if this would update the table if a value was changed or would it just show the values in the fields, but not update if changed.
Hopefully someone will have an idea of how to sort this?
If you need any more information that I might have missed please ask..
Thanks in advance.
WildmanUK