Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007
    Posts
    74

    Unanswered: Dynamic Report Problem

    I'm having a simple problem, but it has me road-blocked right now.

    I am modifying somebody else's database. They had dozens of reports with embedded SQL statements.

    I decided to clean things up. I created 4 different "generic" reports that met my formatting needs, and then tried dynamically passing the .RecordSource query string via a global variable to the Report_Open subroutine associated with the reports.

    That's where things messed up. The global variable appears to be properly recognized in the Report Class Object: I can use the VBA autocomplete functionality on the variable. However, when I look at the value of the variable during runtime debugging, it shows as "Empty" when I enter the report. Looking back at the code that called the report, the global variable still has the right value.

    So, I guess I seem to be having some kind of namespace problem with what I think is a global variable.

    Can somebody help?

    Thanks ...
    AzJazz

    "I'm afraid the holodeck will be society's last invention." - Scott Adams

  2. #2
    Join Date
    May 2007
    Posts
    74
    Nevermind - I got it figured out. I needed to prepend with the Module. to get the namespace to work out right.

    Thanks for an excellent forum!
    AzJazz

    "I'm afraid the holodeck will be society's last invention." - Scott Adams

Posting Permissions

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