Tutorials

Radio buttons search

There are just two simple steps to follow in order to do this.

1. On your search form, make sure you give a group of radio buttons the same name.

For example, you want the user to choose Male or Female and you will get this information from them via radio buttons - one for Male and one for Female.

You would add two radio buttons to your form and call them both rbGender - one would have a value of Male and the other would have a value of Female.

2. In the recordset builder where you need to use the value of the radio buttons in your SQL query, you would add a parameter and give it a run-time value of Request.Form("rbGender").

Once that is set up, if the user clicks on the Male radiobutton and submits the form, the value held in rbGender would be Male - which would be used as the run-time parameter in your SQL query.