Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am new to the coding world and this seems like it would be very basic stuff however I just do not seem to be able to get it on my own or find a tutorial that I can follow.

My database is an Access database that has ~30k rows and 32 columns. The two columns I need to work with we can call ColumnA and ColumnB. ColumnA is my primary key and the value in ColumnB will be the same for 20 or so records, every time.

I have a CheckedListBox that the user enters one or more values into, this value will be the same value as what is stored in ColumnA for each record.

What I need to do is search the database for all checked values. Then, I need to get the value of ColumnB that is in the same record and display all records that match ColumnB.

I hope I have made this clear, if you need further clarification please let me know.
Posted

1 solution

Not quite sure if this what you mean

SELECT ColumnB<br />
FROM table<br />
WHERE ColumnA IN (value1, value2, ...)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900