Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export to RTF with "where" condition (vba) 1

Status
Not open for further replies.

meldrape

Programmer
May 12, 2001
516
US
Hi there, I need to export a report to RTF format but can't figure where to put the "where" condition. Here's my code:
Code:
DoCmd.OutputTo acOutputReport, "rptMaterialsLoad", acFormatRTF, "c:\xfer\Report.rtf", True

When I print the report I use this code:
Code:
DoCmd.OpenReport ("rptMaterialsLoad"), acViewNormal, wherecondition:=strPlan

Is this even possible? If not, any other options? Thanks in advance.
 
The place to put the where condition when using some of the transfer/output-thingie-methods, is within the stored query the report is based on.

These methods doesn't support where condition, as the openform/openreport method does.

Another alternative, I think, is to try to assign it in the on open event of the report, I think that event should be available even when using the transfer/output-thingies.

Roy-Vidar
 
Thanks Roy, that's what I did and it worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top