Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    Naperville, Illinois, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reports - Activate / Open (A2K)

    I have a form with 6 date fields and each date field has a command button. The user clicks the Command button, which then fills in the date field and calls a procedure within the form, passing an an argument (1-6) so the procedure know which field was updated. The procedure does some things and then calls a report, passing the field number as an .openargs. In the Report Activate section, I have a Case Select statement that populates two fields on the report (the date field and name). I also do a couple of lookups in this section as well to fill in some fields. The problem is that it works okay when I call the report in a Preview mode but not when I directly print it. When I directly print only fields from the underlying table are shown, none of the lookups etc.

    I would appreciate it if someone knows why Access works this way.

    Alan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Reports - Activate / Open (A2K)

    The On Activate event doesn't occur when the report is printed directly, only when it is displayed on the screen (in preview mode).
    Put the code in the On Open event of the report instead, this occurs whether the report is previewed or printed.

  3. #3
    Star Lounger
    Join Date
    Apr 2001
    Location
    Naperville, Illinois, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reports - Activate / Open (A2K)

    I still had problems. When I put the code in the Open section, it didn't work at all. It is possible toa ssign a value to a field on the form from these sections, isn't it? I know I have set properties there before. I have reworked the form / report so that I don't need to set the values in the report.

    Howver thanks for your quick response.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Reports - Activate / Open (A2K)

    Glad you found a workaround. Let us know if you'd still like to try to solve the original problem.

  5. #5
    Star Lounger
    Join Date
    Apr 2001
    Location
    Naperville, Illinois, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reports - Activate / Open (A2K)

    No, I have others that are more demanding (which I will promptly add) but THANKS!!

    Alan

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Reports - Activate / Open (A2K)

    Access 2000 reports don't have an OpenArgs property. That was added in Access 2002.
    Charlotte

Posting Permissions

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