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!

want popup to appear and text entered to be on report 1

Status
Not open for further replies.

Nate1749

Programmer
Nov 1, 2002
204
US
My report runs fine, however, I want it to say what week it is on the top. The week can only be known by the user (not regular weeks); anyways so I want the user to run the report and a popup to say what week is it, the user enters 37a and then on the report I have a label at the top that says Week ... and then right after it I want it to say 37a (or whatever the user entered) ... what's the easiest way to do this?

-Nate
 
You can just have whatever initiates the report, button,etc. have some code behind it that displays an input box and a variable there that holds whatever week info your user types in. Then in the code when you do your open report command, open it in preview and have:

Reports![(Name of your report)]![(whatever your text box is named)].Caption = (your week variable)

Just put a text box after your "Week:" label on your report first and this should be fine.
 
The report is activated by double clicking on it from the reports section...

I went under 'properties' for the report and went to 'event' and 'On Open' I put

[Reports]![rptMonthlySummaryWithDept]![txtpop].Caption="the week is.."

and I have a label on the report that says week and next to it is a text box which is unbound and titled txtpop. This isn't working though.... I'm assuming I'm not putting the line of code in the right spot, or maybe I'm off target all together...
 
In the report header place a text box that will display the week. Set its ControlSource to:
Code:
=[Enter Week]
By doing this is you are setting [Enter Week] as a parameter and a dialog box will appear for the user to enter the week.
 
thanks cosmo. I use the brackets in the criteria for queries all the time, but I didn't know you could do it right on the report like that. Thanks again.

-Nate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top