You lost me at FName...
Main Topics
Browse All TopicsI have a table (tblCourses) which has 16 yes/no fields.
I would like to search against this table and have a parameter query.
I have created a form for the input of multiple criteria options against the parameter query so the user doesnt have to step through 16 modal dialog boxes every time they run the query.
Ive tried the obvious use of option (radio) buttons on the form and placing those in the criteria row of the query& y/n check boxes, toggle buttons&
The results of the quesr arent not what I am looking for or expect. It seems like the join needs to be manipulated but there is just a single table.
If I select ynA the results are all those records where ynA is checked.
If I select ynA and ynB Ill get all records where ynA is check and ynB is checked but none where ynA and ynB are both checked&
There are 16 yes/no fields& Id like to accommodate all possible combinations.
Attached are the relevant tables/queries. (Change extracted extension from TXT to AACDB).
Thank you for any help!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Add a Yes/No field called PickFlag to tblCourses . Clear it when you open the 15-checkbox form.
In the on_click event of the Exit button to this form, include a series of conditional events - one for each checkbox- saying, in effect, 'if checkbox = true then tblCourses!PickFlag = true'.
Then just select those courses whose PickFlag is true for your report.
Try this! used four togglebuttons and a command button to build and run query.
Some design modification: if field is ynCOACH, then togggle button is tglynCOACH, to automate the query sql
Try this model by selecting from the 4 toggle buttons and click Try me. All inside the blue recangle.
By following the same naming standard you may include all the 16 togglebuttons.
Unzip to then change .txt to .accdb
Business Accounts
Answer for Membership
by: eghtebasPosted on 2009-09-13 at 23:56:23ID: 25323278
Say you have:
Select FName From Table1 <-- Table1 has 16 Yes/No Fields
Select FName From Table1 Where YesNo1 = IIF(fnYesNo1()="<All>", [YesNo1], fnYesNo1())
In a module have,
Function fnYesNo1() As Variant
"<All")
On Error GoTo 10
Dim Temp As Variant
Temp = Nz(Forms!MyForm!optYesNo1,
MsgBox Temp 'remove it after a test
fnYesNo1 = Temp
Exit Function
10:
fnYesNo1 = "<All>"
End Function
After it worked for first one, add it for the others one at the time, like:
Select FName From Table1 Where YesNo1 = IIF(fnYesNo1()="<All>", [YesNo1], fnYesNo1()) And YesNo2 = IIF(fnYesNo2()="<All>", [YesNo2], fnYesNo2())
Function fnYesNo2() As Variant
"<All")
On Error GoTo 10
Dim Temp As Variant
Temp = Nz(Forms!MyForm!optYesNo2,
fnYesNo2 = Temp
Exit Function
10:
fnYesNo2 = "<All>"
End Function