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

Report....Question

Status
Not open for further replies.

yleeSF

Technical User
Jul 10, 2003
16
US
Hello!

Created a Report that is summing by Quarter. Question is how do you reflect Quarter 1 or Quarter 2 as a label. I can create a text box with Quarter, but would like it to state it's related Quarter... (i.e. 1, 2, 3, 4). How do you do this? Any help would be appreciated.

Thanks!
 
You can do this with code in a Sections Format Event Procedure. Create your label with no caption value in its property. Now put code such as this in the Group Footer Format Event Procedure:

Me![Label3].Caption = "Quarter " & Me![Quarter_Number]

Now I used a control reference here for the Quarter number. You will have to use your control names here but you should see the idea.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Thanks Bob!

I'm a Non-Programmer. Not quite sure how to execute your suggestion. Can you please advise on how I can create the label in a non event procedure? Or break it down step by step.

Thank you once again!!!
 
If you want the Label to appear in the Group Footer section then using the Label tool from the Toolbox, create the label and move it where you want it to be. Size it also.

Now right click on the Group Footer section divider. Select Properties. Scroll down in the properties window to the Format event procedure. This is where you would put the code the .caption property of the label. Select the Event Procedure option in that row and click the . . . box to the right. This opens the code window for that event procedure where we should put the code.

Now the big question is how do you identify each quarter in your report. Is there a control with the number 1,2,3,or 4 in it? If so, then the code I provided you should work pretty well. If not then we need to figure out how to come up with the appropriate quarter number.

Post back with more questions and concerns.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top