Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing a subreport with VBA

Status
Not open for further replies.

DoniFromMars

Programmer
Aug 10, 2006
23
0
0
US
I have a report 'Report A' which contains a subreport,
'subreport A'. I would like to use vba to alter Report A to use Subreport B instead of Subreport A.
I'm getting all kinds of errors.
Is it possible to do this?
If so, what is the syntax?
Thanks!
 
Hi.....

Most things are possible, depending on effort.

Least effort...

Duplicate reports, one with subreportA and one with subreportB

Command buttons on your form to choose the report.

More effort.....

A conditional statement in the event procedure of a command button to run the proper report based on other criteria.

More effort.....

Composite report containing both subreports (not visble)
On open event of the report, make visible the proper subreport based on other criteria.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top