In Access 2003: A table with four yes/no fields is part of a query used as data source for a report. The yes/no fields show in the datasheet and the report as checkboxes; the default value of the field is "no". The report pulls in a subreport. I want the subreport to be visible ONLY if any of the yes/no fields contain a yes (showing as a check in the checkbox). I tried an if then statement like this:
If Field1 ="no" AND Field2 = "no" AND Field 3 = "no" AND Field 4 = "no" then
[Subreport].visible = false
Else [Subreport].visible=true
Endif
I also tried a similar statement using IsNull [Field1] AND etc.
I haven't used Access VBA since 2002 using Access 2000 - I'm lost. How should the "if" part be stated?
If Field1 ="no" AND Field2 = "no" AND Field 3 = "no" AND Field 4 = "no" then
[Subreport].visible = false
Else [Subreport].visible=true
Endif
I also tried a similar statement using IsNull [Field1] AND etc.
I haven't used Access VBA since 2002 using Access 2000 - I'm lost. How should the "if" part be stated?
Comment