Yes, I would like one of the fields from the report, or its source which
is a
table, to be implanted into the filename when running the action.
Right now the code is in a separate module which is activated by the run
button in the module design window. The code in the module is:
Private Sub createReports()
Dim fileName As String
fileName = Reports![LicReport09-09-05]![EntityCode]
DoCmd.OutputTo acReport, "LicReport09-09-05", "HTML(*.html)", "C:\
Documents and Settings\\My Documents\License Test\ & strfileName & .html",
False, "", 0
End Sub
The result is that it exports the fies to the right location and in the
right
format, but the file name comes out like "& strfileName page1.html." and
"&
strfileName page2html." etc.
I don't know how, either in a macro, or in the vba design window to get
Access to understand that a field name needs to be part of the file name.
What are you wanting... the value from one of the fields in the report's
recordsource query? the value in a control on the report? what event runs
the OutputTo macro action?
I am trying to do basically the same thing except using the OutputTo
action.
[quoted text clipped - 20 lines]