I have an MS Access table where each record includes, among many other things, 12 boolean fields (checkboxes). I want to build a report which, ideally in ONE text box, displays a string generated as follows:
- First, it displays the contents of a specific text field.
- If *none* of the 12 boolean fields are checked (i.e. none of them are true), then that's it - the string ends at this point.
- If at least one of the boolean fields is checked (true), it gives, in parentheses, a list of short strings corresponding to the true ones.
Examples:
If the text field says "Boogabooga " and none of the boolean fields are checked off, this text box reads:
Boogabooga
If the text field says "Ikiikiptan g" and three of the boolean fields are checked off, namely Alpha, Charlie and Foxtrot, this text box reads:
Ikiikiptang (Alpha, Charlie, Foxtrot)
What is the easiest way to accomplish this? I imagine I'd want a query that spits out the parenthetical part, but the exact implementation escapes me.
- First, it displays the contents of a specific text field.
- If *none* of the 12 boolean fields are checked (i.e. none of them are true), then that's it - the string ends at this point.
- If at least one of the boolean fields is checked (true), it gives, in parentheses, a list of short strings corresponding to the true ones.
Examples:
If the text field says "Boogabooga " and none of the boolean fields are checked off, this text box reads:
Boogabooga
If the text field says "Ikiikiptan g" and three of the boolean fields are checked off, namely Alpha, Charlie and Foxtrot, this text box reads:
Ikiikiptang (Alpha, Charlie, Foxtrot)
What is the easiest way to accomplish this? I imagine I'd want a query that spits out the parenthetical part, but the exact implementation escapes me.
Comment