I have a textbox and 3 comboboxes in my form, what i need from this is when the user enter a value in text box (I checked if the value exist on my database or not) i need other query to returned and fill my 3 comboxes in all record information about the text box entry.

5 Years
Discussion Span
Last Post by Pgmer

Asuming the information filling the comboboxes exists in the record from which you are searching the text in the textbox, you can do a query returning 3 vaues (one for each combobox) and assign it to each combobox.

If the comboboxes will be filled with the records thrown by the query from the text inserted in the textbox, I'd recommend filling them individually, first execute the query (and do the subsequent while loop) to fill the first combobox, then the second and then the third.


my query returned all record in the table , i need to return 1 row each time the user enter the value , what sholud my code look like

what i do is
Comm.CommandText = "SELECT ProjectTenderingNO FROM BuyNewTendering WHERE ProjectTenderingNO = '" & proTNO.Text & "'

then i bounded the combobox and wirte a select query inside add query depend on ProjectTnederingNO,

how i can do what you wirte above??


Then based on the Query result u need to set the selectedtext property of the combo..

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.