Full Version: Query Based Off Radio Button Selection
UtterAccess Discussion Forums > Microsoft® Access > Access Queries
thenunownedgoat
I have a (hopefully) simple question for those who are more Access-experienced than myself...
Here is what I would like to happen:
User selects report --> Form appears with radio buttons --> User select appropriate radio button --> Report is open based on criteria set from radio buttons.
That is, after the user selects which report s/he wants to view, another form is opened that asks them to pick between three options (1, 2, and 3). The option that the user selects would become the criteria for the query that the report is based off of.
Any advice?
Thanks.
Steve Schapel
Thenunownedgoat,
On a nutshell, the value of the radio button (which maybe is a part of an Option Group?) would be referenced in the criteria of the query that the report is base on.
If you need more explicit help, you will need to give us some more information, maybe with specific examples, regarding the data (field) that the criteria selection relates to, and the details of how you see the radio button relating to the data selection.
thenunownedgoat
Okay, I understand what you're saying - I'm just unsure of the specifics.
The database I'm in the process of designing is for the free tutorial program at the college I work for. When a student comes in and requests a tutor, we enter their information into the database; we also maintain information for the tutors. Most importantly, we keep track of the number and length of sessions through the database.
I'm designing several reports to view some basic information for all of the student learners based on criteria. I have a report for students who requested tutoring, then later dropped the course. I'd like to be able to view that report based on the semester. So, my database user clicks the button that says "Students Who Dropped Course" -- then that Option Group comes up and allows them to select the semester (Fall, Spring, Summer).
What needs to happen is the query criteria for the record's "Semester" field is whatever the user selected from that form with the Option Group. Then, the report gets its information from that query.
The semester information is housed in a Semesters table, and each semester has a code (i.e. Fall = 1, Spring =2, Summer = 3). So in my Option Group, the option value would be "1" for Fall, etc. However, I'm not sure what I would type into the criteria line in the query.
Thanks for your help! sad.gif
Steve Schapel
Thenunownedgoat,
Thanks for the further information.
In the Query, in the Criteria of the field that shows the numerical code for the semesters, you would type the equivalent of:
[Forms]![NameOfFormContainingOptionGroup]![NameOfOptionGroup]
orange999
There is info and examples at the following site that may be of help to you.
http://www.fontstuff.com/access/acctut19.htm
Edited by: orange999 on Mon Jun 2 23:05:44 EDT 2008.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.