Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Location
    Brampton, Ontario, Canada
    Posts
    27

    Unanswered: Set Report RecordSource via VBA?

    How can I set the record source of an existing Report
    to a SQL string i've built in VBA
    and then print the report from VBA.
    The help file tells me that i can't refer to a report in
    VBA unless it is already open. If it's already open
    How do i change the recordsource.
    I'm confused. Any Help???

    Thanks

  2. #2
    Join Date
    Jan 2002
    Location
    At the Edge of America!
    Posts
    55

    Re: Set Report RecordSource via VBA?

    Use the OnOpen command on the report and set the datasource for the report at that point.

    You can pass your varible via a public variable.


    Originally posted by BradCO
    How can I set the record source of an existing Report
    to a SQL string i've built in VBA
    and then print the report from VBA.
    The help file tells me that i can't refer to a report in
    VBA unless it is already open. If it's already open
    How do i change the recordsource.
    I'm confused. Any Help???

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •