Opening report based on the selection from combobox (1 Viewer)

Mezta1988

Registered User.
Local time
Today, 18:32
Joined
Jan 22, 2019
Messages
41
Hi,

I'm new to MS access, and I would like to do an experiment on how I can filter a report based on the selection from my combo box. I've watched so many tutorials but it seems like I'm having a hard time to follow it. I did even follow one tutorial from youtube and did exactly what the video says but still, it didn't work for me. It's been a week now and still, I couldn't find the right solution to complete my experiment. I hope you good people out there can help me to get this thing done.

Note: I'm using MS ACCESS 2013 and 2016, I also attached the MS ACCESS file which I'm currently experimenting.
 

Attachments

  • test.accdb
    896 KB · Views: 79

June7

AWF VIP
Local time
Today, 07:32
Joined
Mar 9, 2014
Messages
5,470
Combobox shows Gender but value of combobox is ID because the combobox RowSource is multi-column and ID is BoundColumn. The query is trying to filter Gender with ID as parameter so of course there is no match. Include ID in the query and put criteria under that field. Or modify the combobox to not use ID field.

I NEVER use dynamic parameterized query. I prefer to set filter criteria with code when the report opens. I also use VBA instead of macros.
 
Last edited:

Mezta1988

Registered User.
Local time
Today, 18:32
Joined
Jan 22, 2019
Messages
41
Combobox shows Gender but value of combobox is ID because the combobox RowSource is multi-column and ID is BoundColumn. The query is trying to filter Gender with ID as parameter so of course there is no match. Include ID in the query and put criteria under that field. Or modify the combobox to not use ID field.

I NEVER use dynamic parameterized query. I prefer to set filter criteria with code when the report opens. I also use VBA instead of macros.
I'm sorry, I didn't think about the bound column. It is working now thank you very much.
 

Users who are viewing this thread

Top Bottom