Query Combo Box (1 Viewer)

stu_c

Registered User.
Local time
Today, 06:59
Joined
Sep 20, 2007
Messages
366
Hi all,
how do I get a query to look for a value in Column 2 of a combo box?
 

Ranman256

Well-known member
Local time
Today, 01:59
Joined
Apr 9, 2015
Messages
4,102
in the AFTERUPDATE event of the combo, put that column value into a hidden text box.
Then the query can read the textbox.

'in VB , columns begin with zero, so column 2 is: cboBox.column(1)
Code:
sub cboBox_Afterupdate()
txtBox = cboBox.column(1)   
end sub

query:
select * from table where [field]=forms!fMyForm!txtBox
 

Users who are viewing this thread

Top Bottom