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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reports with AutoFormat 1

Status
Not open for further replies.

Kckronic21

Programmer
Jul 29, 2001
81
US
I have created an Equipment Report that is opened through the use of the Equipment Form. I have a listbox that the user can select from 4 different layouts of the equipment. [Forms]![Equipment_Form]![Layout_listbox]. What I would like to do to to have the AutoFormat button that shows that different styles of a Report to be on the Equipment Form in the Form View Mode, so that when the user presses this button, he or she can choose which style of the report that they want for whichever layout that they choose. I also want to know how to create my own custom report styles. Thanks!
 
I don't know of a method to redo the report style on the fly through code, but you can make 4 reports (1 in each style) and then have the list box drive which report to run. Have the bound field of you list box contain the name of your report as saved in the report tab and then in the regular code you get when you have the access wizard generate a report printout button change the line the says:

stDocName = "ReportYouSelectedInWizard"

to this:

stDocName = Layout_listbox

Now access will look at the listbox, assign the name of the report to be opened based on what's selected and open the correct report.

As for making your own styles this is in the online help, type create autoformat into the wizard dialogue and select the help topic that pops up.

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top