PC Review


Reply
Thread Tools Rate Thread

Change Report Title Based on Source & Date?

 
 
Jim
Guest
Posts: n/a
 
      23rd Apr 2010
I have a report with the following code behind:

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)

If Format(Forms!frmCommission!cboStartDate, "mmyyyy") =
Format(Forms!frmCommission!cboEndDate, "mmyyyy") Then

Me.txtTitle = "Commission " & Format(Forms!frmCommission!cboStartDate,
"mmm/yyyy")
Else
Me.txtTitle = "Commission " & _
Forms!frmCommission!cboStartDate & " To " & _
Forms!frmCommission!cboEndDate
End If

End Sub

Private Sub Report_Open(Cancel As Integer)

Select Case Form_frmCommission.optSource

Case 1
Me.RecordSource = "qryCommInvUS"
Case 2
Me.RecordSource = "qryCommInvCanada"
Case Else
MsgBox "Select Report"
End Select

End Sub

I need to change the title of the report to add either Canadian or U.S. to
the title depending on the Record Source, leaving the other criteria in
place at the same time.
Thanks for any help.

Jim


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report title based on Date? Jim Microsoft Access Reports 6 23rd Apr 2010 04:45 PM
Trying to change report title during report open event =?Utf-8?B?QmlnZ2xlcw==?= Microsoft Access Reports 2 8th Sep 2006 04:40 AM
Change report title based on Form data tim@rybak.com Microsoft Access Reports 1 4th Nov 2005 07:51 PM
How to change the report title =?Utf-8?B?R2FicmllbA==?= Microsoft Access 1 5th Oct 2004 05:40 AM
Title and Date change in report Linda Microsoft Access Reports 2 24th Feb 2004 04:20 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:52 AM.