I have a table called HRData that includes a field called MRC
I have a form that has a listbox that sources the unique values for MRC an allows for one selection. If I want to use VBA to execute a query against the entire table and filter on MRC I am running into issues trying to reference the selection the value from the Listbox.
so base query would be
SELECT * FROM HRData
WHERE [MRC] = 'The selection in the list box'
How would this need to be adjusted if:
1. The listbox was muliti select and I need an IN statement instead.
SELECT * FROM HRData
WHERE [MRC] In ('Selecton 1' , 'Selection 2'... etc.
2. I wanted to filter against more than just MRC but also other fields like "Country" or "Job Function" that also have list box choices.
Any guidance would be greatly appreciated.
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.