Change the capiton of the Report

T

ToryBennyBassiKova

I am printing to pdf files


For i = 1 To Liste4.ListCount - 1
DoCmd.OpenReport stDocName, acViewNormal, , "MXId=" & Liste4.Column(2, i)
Docmd.SelectObject acReport, stDocName
Docmd.RunCommand acCmdPrint
Docmd.Close acReport, stDocName, acSaveNo
Next i

I want to give each report a unic name as i e: Prefix & Liste4.Column(2, i)

How can I change the stDocName, so it is easy to save?
 
A

Al Campagna

ToryBennyBassiKova,
Use the OpenArgs argument of the OpenReport method.

DoCmd.OpenReport stDocName, acViewNormal, , "MXId=" & Liste4.Column(2, i), ,
"XXYXX"

On the report... = [OpenArgs] would display as XXYXX.
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

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