Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using option (RADIO) buttons to pick criteria

Status
Not open for further replies.

bravo6

IS-IT--Management
Mar 23, 2006
83
US
Hi, I have an unbound form which is used to select date range and other criteria for some queries that are used in a report. I would like for the user to be able to select branch numbers (a four digit number) using radio buttons. There are 12 branches and they may choose as few as 1 and as many as 12 of the branches to run the report. I've never used these buttons in a form before. How do I refer to the button on the criteria of the query? How do I tell the form/query what the field value is if the button is selected? Not selected?

Thanks for your help. I have always found this forum to be wonderfully helpful and am greatful to you folks that take the time to help others out.
 
This is very much a forms question: Forum702

You will need to build an SQL string, if you wish to use radio buttons. You could loop through the relevant controls and, for each button=True, add branches to a list for use with In:

[tt]"Select ... Where Branch In (" & strList & ")"[/tt]
 



Hi,

"...they may choose as few as 1 and as many as 12 ..."

This is NOT how Option Buttons work. Option Buttons are MUTUALLY EXCLUSIVE. You referred to them as Radio Buttons. You cannot tune more than ONE station at a time from your radio, can you?

What you want are either CheckBoxes or a Multi-Select Listbox.

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top