Full Version: Option group to determine which report to call?
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
kmart320
I want to utilize an option group on a form to call a report based on the option selected. Basically select option and click a button to generate the report. How do I get the button to recognize which option is selected in order to pull the report?
Thanks!
kmart320
HunterOfTheShadows
Use VBA. If you are using a cbo box for your options, then in the SQL or whatever you base your report on, reference the box ( eg. in qry -> fname in qry design view make it "where" and criteria is forms!frmname!fnametxtbox.value).
You can also set the fname = to fnametxtbox on the "run report" cmd button on the On click event of the cmd button.
HTH
-Hunter
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.