Rx_
Nothing In Moderation
- Local time
- Today, 01:45
- Joined
- Oct 22, 2009
- Messages
- 2,795
See attached diagram: Dynamic Report - user selects 1 or all 4 Checkbox controls. Results in SQL statement to be used for a report. Any combo of checkbox results in the AND for the column for the SQL result.
Any Demo, links or ideas would be appreicated.
A function with a case statement could select each possible outcome. Since there are 4 binary option buttons that would be 2 to the forth power minus 1 possible outcomes. That is 15 SQL statements to write.
Or something that can construct a string:
"Select CustumerID, CustomerStatus, " & MyCheckboxString &
" From MyTable"
Where MyCheckboxString adds the fields as needed.
It won't be as simple as above, because each checkbox has optional criteria's for seletion too. But, that is a different question for later.
Any Demo, links or ideas would be appreicated.
A function with a case statement could select each possible outcome. Since there are 4 binary option buttons that would be 2 to the forth power minus 1 possible outcomes. That is 15 SQL statements to write.
Or something that can construct a string:
"Select CustumerID, CustomerStatus, " & MyCheckboxString &
" From MyTable"
Where MyCheckboxString adds the fields as needed.
It won't be as simple as above, because each checkbox has optional criteria's for seletion too. But, that is a different question for later.