setting the record source of a report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to use vb code to export a report to another folder as an .rtf
file, which i can do. My problem is that my report has parameters. Is there
any way that i can set the recordsource of a report, while it is not open? I
can do it if the report is open in design view, but is there any way around
this?
 
You can programmatically set the RecordSource of the report in its Open
event:

Private Sub Report_Open(Cancel As Integer)
Me.RecordSource = "SELECT ...
End Sub
 

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

Back
Top