Re: report OutputTo with parameter



On Sat, 31 Mar 2007 13:25:22 +0100, "Mark" <mreed1975@xxxxxxxxxxxxxx>
wrote:

An elegant workaround is to replace the parameter with an expression
that checks a value in a (possibly hidden) field:
WHERE tbl_Supp_conf_head.Supplier_ID=Forms!SomeForm!Supp_ID

-Tom.


Hi All,
I have hit a stumbling block whilst trying to automate the output a
report where the source for the report is a query that contains a parameter.

The query is as follows:

PARAMETERS Supp_ID Text ( 255 );
SELECT tbl_Supp_conf_head.Date_Created, tbl_Supp_conf_head.Created_By,
tbl_Supp_conf_head.Supplier_ID, tbl_Supp_conf_head.BookRef,
tbl_Supp_conf_head.PreAdID, tbl_Supp_conf_head.Comments,
tbl_Supplier_Questions.Question_text, tbl_Supp_conf_line_Score.Score,
tbl_Supplier_Questions.Weighting
FROM tbl_Supp_conf_head INNER JOIN (tbl_Supp_conf_line_Score INNER JOIN
tbl_Supplier_Questions ON tbl_Supp_conf_line_Score.Question_ID =
tbl_Supplier_Questions.Question_ID) ON tbl_Supp_conf_head.Rec_ID =
tbl_Supp_conf_line_Score.Rec_ID
WHERE (((tbl_Supp_conf_head.Supplier_ID)=[Supp_ID]));

I want to output the report rather than the query as the report passes some
of the formatting to the output.

I have read the help file but it doesn't state if you can pass a parameter
to the report.

expression.OutputTo(ObjectType, ObjectName, OutputFormat, OutputFile,
AutoStart, TemplateFile, Encoding)

Is there some way round this or some other way that I can get code to output
the report into xls with the same formatting??

TIA,

Mark


.



Relevant Pages

  • Re: Report/Query not selecting specific records
    ... I don't care much about the formatting of a field in the underlying table. ... This is a saved query "qryIfta" This query is the record source for the ... report & the report only serves as a vehicle to display the results of the ... "Duane Hookom" wrote: ...
    (microsoft.public.access.reports)
  • Re: Access reports or Word Document
    ... Query A and Query B are related on the Primary ... create a report based on Query C. ... using one query to populate the header section and populate ... It is also easier to do complex formatting in Word. ...
    (microsoft.public.access.gettingstarted)
  • Re: Access reports or Word Document
    ... Query A and Query B are related on the Primary ... create a report based on Query C. ... using one query to populate the header section and populate ... It is also easier to do complex formatting in Word. ...
    (microsoft.public.access.gettingstarted)
  • Re: Simplest way to create a report to look like a mail merge document
    ... For simple mail merge letters without Word, consider the Query By Form ... You could also send the report to Word for further formatting. ... > called (c/w writing an appropriate data file). ...
    (microsoft.public.access.reports)
  • RE: Report/Query not selecting specific records
    ... formatting within a query. ... This is a saved query "qryIfta" This query is the record source for the ... report & the report only serves as a vehicle to display the results of the ... button sets the form's visible property to false and opens the report. ...
    (microsoft.public.access.reports)