Programmatically deleting a GroupLevel

D

dna

Please can someone tell me how to programmatically REMOVE a GroupLevel from a
report. I currently have a report which I am copying and programmatically
amending to create different flavors of the report. One of these reports
requires that I have no grouplevel (most of the report flavors need the
grouplevel so that is why the report I am copying starts with the grouplevel
already created). So my question is how to programmatically delete a
grouplevel from a report?

I am using Access 2007.
 
M

Marshall Barton

dna said:
Please can someone tell me how to programmatically REMOVE a GroupLevel from a
report. I currently have a report which I am copying and programmatically
amending to create different flavors of the report. One of these reports
requires that I have no grouplevel (most of the report flavors need the
grouplevel so that is why the report I am copying starts with the grouplevel
already created). So my question is how to programmatically delete a
grouplevel from a report?

I am using Access 2007.


I haven't checked A2007, but, in all previous versions,
there was no way to remove a group level using VBA code.

In general, you are far better off using a single copy of a
report and using code in its event procedures to dynamically
adjust how it displays. If you will explain what you are
trying to accomplish (instead of how you thought you should
do it), it's likely that someone will be able to provide a
viable approach.
 
D

dna

OK, thanks Marsh. I thought that was the case but nice to have an expert's
opinion on whether it is possible.

Ordinarily, I would dynamically configure the various flavors of report from
a single report at run-time via event code but in this case I've chosen to
dynamically generate static versions of the reports which I can then further
enhance in design mode via the IDE to tweak/add more complex
constructs/layouts that would be time-consuming and/or exceed my current
ability in Access to do programmatically. Note that this dynamic report
creation is not needed for an end-user application - it is purely being done
to save me time building the different static versions of the reports that
are needed for data I am analyzing.
 
M

Marshall Barton

dna said:
OK, thanks Marsh. I thought that was the case but nice to have an expert's
opinion on whether it is possible.

Ordinarily, I would dynamically configure the various flavors of report from
a single report at run-time via event code but in this case I've chosen to
dynamically generate static versions of the reports which I can then further
enhance in design mode via the IDE to tweak/add more complex
constructs/layouts that would be time-consuming and/or exceed my current
ability in Access to do programmatically. Note that this dynamic report
creation is not needed for an end-user application - it is purely being done
to save me time building the different static versions of the reports that
are needed for data I am analyzing.


If you are doing a design helper procedure for yourself,
then you can do just about anything ...
except delete group levels.

Since ot would be a one time manual edit, it's not too great
a burden ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top