Hi I have 3 tables
Products
- product_id
- product
Customer
- cust_id
- name
Orders
- order_id
- cust_id
- product_id
My Orders table is currently empty and I want to insert some data. I want to use 2 listboxes so that I can select the records available. I have inserted into the Orders table by just selecting ID from 2 list boxes Customer ID and Product ID. And placed the results into variable and insert into the Orders table which worked fine. However I would like for the list box to display the Names/Product instead of ID to make it clearer who and what product I’m selecting but when I select an item I want the id to be selected for the insert statement not the text. So the text for display and the ID for the insert/
So for example in customer listbox I select ‘Shawn’ then in product listbox I selected ’ Hat’ I need the id for these to be placed in the orders table. My problem is I don’t know how to join them to do this.