Does the query name actually contain [ and ] characters? You do not need
those characters to delimit the name of a query in this step when the query
name has blank spaces in the name. Try this:
Set qdf = dbs.QueryDefs("mailingReportBase")

Signature
Ken Snell
<MS ACCESS MVP>
> I am trying to loop through records in a query and save a report to word for
> each record. Steve Schapel kindly got me started with some code but I am a
[quoted text clipped - 19 lines]
> DoCmd.OutputTo acReport, DLookup("[name]", "templates", _
> "[templeId]=" &
[Forms]![systemForm]![mailContractForm].[Form]![letterFormBase].[Form]![temp
late]), _
> "RichTextFormat(*.rtf)", "C:\Documents and
> Settings\Judith\Desktop\test1\'" & [fileLoc] & "'.rtf", False
[quoted text clipped - 11 lines]
> Set rst = qdf.OpenRecordset()
> Too few parameters expected. Any suggestions please
judith - 26 Nov 2004 06:35 GMT
I think I have found my mistake from your great mvps.org/access site. The
query had a criteria based on an open form field. I now understand that it
must be a straight query so I will test for the criteria in the Do Loop.
Thanks very much for your help
> Does the query name actually contain [ and ] characters? You do not need
> those characters to delimit the name of a query in this step when the query
[quoted text clipped - 44 lines]
> > Set rst = qdf.OpenRecordset()
> > Too few parameters expected. Any suggestions please
Ken Snell [MVP] - 26 Nov 2004 16:09 GMT
That was going to be my next question... :-)
Glad it's working for you!

Signature
Ken Snell
<MS ACCESS MVP>
> I think I have found my mistake from your great mvps.org/access site. The
> query had a criteria based on an open form field. I now understand that it
[quoted text clipped - 31 lines]
> > > DoCmd.OutputTo acReport, DLookup("[name]", "templates", _
> > > "[templeId]=" &
[Forms]![systemForm]![mailContractForm].[Form]![letterFormBase].[Form]![temp
> > late]), _
> > > "RichTextFormat(*.rtf)", "C:\Documents and
[quoted text clipped - 12 lines]
> > > Set rst = qdf.OpenRecordset()
> > > Too few parameters expected. Any suggestions please