|
-
Aug 23rd, 2005, 09:54 AM
#1
Thread Starter
Frenzied Member
ACCESS: How To: Set Label Caption in a Report [RESOLVED: OpenArgs]
Esteemed Forum Participants and Lurkers:
===============================
ACCESS '02, '03
I have a common Report format for 4 different Departments, and in the code with the 'Department Selector' buttons I am trying to change one of the Labels in the report "Page Header" to reflect the different department selection. I have tried many approaches, but nothing seems to work yet. Here is what I am working with now:
Added Note: The following code does PRINT correctly, and it also displays correctly on pages 2 and above for multiple pages. It just doesn't affect Page 1 displayed in a window!!!
Code:
Private Sub Command0_Click()
Dim aWhere As String
'Select a WHERE statement (from Global List) based on the Radio Button Group
aWhere = aDept(Form1.Grp_Dept.Value)
'This successfully opens a window with the correct Report
DoCmd.OpenReport "Price_1", acViewPreview, , aWhere, acWindowNormal
'''TEST TEST TEST TEST This WORKS
MsgBox Reports("Price_1").Controls("Dpt_Label").Caption
'''END TEST
'Can a Report be changed once it is open??? This doesn't change anything!
Reports("Price_1").Controls("Dpt_Label").Caption = "TEST 1"
End Sub
Any and all comments, suggestions, and assistance is sincerely appreciated.
Last edited by Webtest; Aug 23rd, 2005 at 12:03 PM.
Reason: RESOLVED
Blessings in abundance,
All the Best,
& ENJOY!
Art . . . . Carlisle, PA . . USA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|