Using checkboxes in a form to include/exclude fields from a report

V

Vargas

Hello everyone.

I need to create a report that can include field(s) on a report IF a user
placed a checkbox next to that filed(s) name in a form.

I understand that I can do that by using VBA in the ON FORMAT event of a
report's detail section, and it works.

The output looks something like this:

Field1Name Field2Name Field3Name
------------------------------------------------------------
Field 1's value Field 2's value Field 3's value

BUT...what if the user selected Fields 1 & 3, leaving out Field 2?

THIS IS THE AREA WHICH I'M LOOKING FOR HELP. The output on a situation like
this is:

Field1Name Field3Name
------------------------------------------------------------
Field 1's value Field 3's value

Is there a way to make fields accommodate automatically so that there are no
spaces horizontally between them?

Field 1's value <---------------------- Field 3's value

This example only shows 3 fields, but in reality, my container has 3 tables
and the form used to build the query that will be used by the report includes
all the fields (over 15) that are available for the user to choose from.

Thanks in advance for your kind help.
 
Top