G
Guest
Ok Say I have two tables "Customers" and a table "Orders
On my Orders table I have the Foreign Key "CustomerID" used to lookup the relevant customer.
I want to populate the customer contact details on the form into blank fields, but not store the information on the orders table as I already have the CustID to tell me who the order is for.
I can do this using the Dlookup function on an AfterUpdate on the Combo box on the orders form IE
Me!OrderForm_CustomerTel1 = Dlookup("[CustomerTel]","Customers","[ComboOrdersForms]=[CustomerID]"
So when I select a customer I tell it to go grab the Customer Telephone number where the Foreign Key in Orders matches the Primary Key in Customers and dump it in a field on my form named CustomerTel
This works fine if you are wishing to populate fields which are stored on the Orders Table which can then be also altered afterwards without messing the original contact details, however I just wish to view them
Here's the problem I have... Because the Blank fields are Unbound to the CustomerID on the order form the last selection continues to the next blank or the previous form until it is changed again.
My tables are a little more complicated, but it would be useful to know how to populate unbound fields and keep them bound to that record
Next..
Some Customers have more than one Business. I was thinking about a filtered Combo Box on the form so when you select your customer the next choice for the address is filtered down to that CustomersID.
What tables I have is Customers - Business Details - Proposal
Again On my Proposal table I only need to store the CustomerID, which should be able to give me the Customers Business details. At first i used a subform but it just reverted back to the first address after I had chosen a second. It would be ok if all my customers had just one Business address
However I believe a Combo Box wil be best on my Proposal form to display the details of the customer
Anyone got any ideas
Thank you
On my Orders table I have the Foreign Key "CustomerID" used to lookup the relevant customer.
I want to populate the customer contact details on the form into blank fields, but not store the information on the orders table as I already have the CustID to tell me who the order is for.
I can do this using the Dlookup function on an AfterUpdate on the Combo box on the orders form IE
Me!OrderForm_CustomerTel1 = Dlookup("[CustomerTel]","Customers","[ComboOrdersForms]=[CustomerID]"
So when I select a customer I tell it to go grab the Customer Telephone number where the Foreign Key in Orders matches the Primary Key in Customers and dump it in a field on my form named CustomerTel
This works fine if you are wishing to populate fields which are stored on the Orders Table which can then be also altered afterwards without messing the original contact details, however I just wish to view them
Here's the problem I have... Because the Blank fields are Unbound to the CustomerID on the order form the last selection continues to the next blank or the previous form until it is changed again.
My tables are a little more complicated, but it would be useful to know how to populate unbound fields and keep them bound to that record
Next..
Some Customers have more than one Business. I was thinking about a filtered Combo Box on the form so when you select your customer the next choice for the address is filtered down to that CustomersID.
What tables I have is Customers - Business Details - Proposal
Again On my Proposal table I only need to store the CustomerID, which should be able to give me the Customers Business details. At first i used a subform but it just reverted back to the first address after I had chosen a second. It would be ok if all my customers had just one Business address
However I believe a Combo Box wil be best on my Proposal form to display the details of the customer
Anyone got any ideas
Thank you