Hi,
I am trying to query a database to retrieve information about a product. Firstly the user must select a product from a Combo box, and what i want it to do is when they have selected a product for it to search for the items that are within the product. I have a timer in which will search for the product items but may use a command button instead, but that's irrelevant. What makes this different from a normal query is that a product can only have 8 items or less and what i want it to do is to display each individual item into a separate label (array).
Below is the code i have to add the records into the combo box
Do Until Data1.Recordset.EOF 'Stops when there are no more records to be added
CmbProduct.AddItem Data1.Recordset("Product Name") 'Loads all the Products from the database and adds them to the combo box
Data1.Recordset.MoveNext 'Moves onto the next record after the previous has been added
Loop
Tbl_Item_Product is the table name
The records i want from the table is "Item Name" and there will be > 1 but < 8 records that match the product. The label array i want to add each record into is label9(0 to 7). Hope i've supplied enough information for you, can provide more if required. Thanks :)