HELP! how to match table Field data with listbox data in form

G

ges

I created a form try to find matching data in table field with recordset in
listbox after calculation.
In this form:

comboBoxA + 8 = lstResult (listbox)
Example comboBoxA value = 6,8,10,15,30
lstResult recordset show: 14, 16, 18, 23,38

in tblNumber.[three] data = 12,16,23,45,52

I try to find the matching data between calculation result (lstResult) that
match tblNumber.[three] in this case is 16, and try to show it in lstMatching
(listbox Matching)

I try SQL statement as follow:
strSQL = "SELECT tblNumber.tree FROM tblNumber WHERE (((tblNumber.three)= " &
lstResult.Column(0) & ";"

but the vba debug.print show result as follow:
SELECT tblNumber.three. tblNumber.ID FROM tblNumber WHERE (((tblNumber.three)
= ());

it did not compute the data in lstResult.Column(0)

How do I get the value in lstResult.Column(0) so I can compare it with tbl.
three to find matching data?

Thanks in advance for any help.

B.rgds,
ges
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top