Query Combo Box (1 Viewer)

stu_c

Registered User.
Local time
Today, 12:23
Joined
Sep 20, 2007
Messages
489
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, 07:23
Joined
Apr 9, 2015
Messages
4,337
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