Change report name

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!
 
D

Duane Hookom

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.
 
J

John

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:
 
D

Duane Hookom

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top