Change report name

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi,

Is there a way to change report name to be like OrderID_FirstName_LastName

I need it to be like that already in report preview because my pdfprinter is
naming the pdf file according the reports name which is showing in preview
window. We are sending alot of orders to the factory soit would really speed
up things. We save the pdffile under customers folder, but know I have to
manually rename the pdf file.

Thanks!
 
You can generally set the Caption property of the report in the On Open
event. My experience is that this value is used as the default file name.
 
Hi!

Thanks for reply. What I ment was that can I set the Caption property or
some other property to be build from the current records fields. Example:
="Order" & "_" & ([FirstName])

I tried that but the reports title in preview window is now ="Order" & "_" &
([FirstName])

Hopefully I can explain what I mean? Thanks

"Duane Hookom" kirjoitti:
 
You could maybe use:

Private Sub Report_Open(Cancel As Integer)
Me.Caption = "Order_" & Dlookup("FirstName",[RecordSource])
End Sub

Otherwise you could have a function return firstname value from an open form
or openargs or some place.
--
Duane Hookom
Microsoft Access MVP


John said:
Hi!

Thanks for reply. What I ment was that can I set the Caption property or
some other property to be build from the current records fields. Example:
="Order" & "_" & ([FirstName])

I tried that but the reports title in preview window is now ="Order" & "_" &
([FirstName])

Hopefully I can explain what I mean? Thanks

"Duane Hookom" kirjoitti:
You can generally set the Caption property of the report in the On Open
event. My experience is that this value is used as the default file name.
 
Back
Top