Programmatically changing background picture of a report.

u0107

Board Regular
Joined
Dec 18, 2002
Messages
154
Hello all,

I have a report definition which I have created and is made accessible through a series of menu form options.

At one stage (say Stage 4), the user has to click a button to select specific parameters which are displayed to him. One of the parameters may or may not contain a date.

If a date is contained then I want to put a specific picture as the background of the report. If not contained then a different picture as the background.

Simple to program really if the report is within the scope of the module in which this presence/absence of date is detected.

Unfortunately, the report comes within the scope only after the execution of this statement: "DoCmd.OpenReport "Report_Plan", acViewPreview" at which point control shifts to the "On Open" Event procedure of the Report.

What I would like to do is to refer to the "Picture" Parameter of this report before execution of this command and specify the picture file name.

I know I do have the option of loading a boolean global variable with true or false based on whether the date is contained or not, and then checking the value of the boolean global variable in the Open Event Procedure of the report and setting the picture file name appropriately. IMHO, this is creation of a global variable only for passing a single parameter from one procedure to another and not truly global in the project.

What I am interested in really doing is (using ADO), opening Catalog or some such thing where I can find the report definition and modify it directly there, instead.

I have the Access 2000 Developers Handbook, Access 2000 VBA Handbook and Mastering Microsoft Access 2000 Development Books but could not find anything therein to help me.

Hope someone can help.

Thanks

Uttam
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,221,579
Messages
6,160,615
Members
451,658
Latest member
NghiVmexgdhh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top