Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query/Report/Macro OK (WIN 2000 Acc 97)

    I have a simple query. When run through the database window, it takes 2 seconds or less.
    I have a report based on this query. When run through the db window it takes 2 seconds or less.
    I have a macro based on the report. When run through the db window it takes 2 seconds or less.
    I have a command button on a form with the macro behind it. When I click the button, it takes almost 2 minutes
    to open the report. I compacted. I created a new command button. It still takes 2 minutes.
    What should I be looking for and what can I do about this? It's got me stumped (on a Saturday, no less )

    Thank you,
    Michael

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

    Re: Query/Report/Macro OK (WIN 2000 Acc 97)

    What happens if you just use a DoCmd.OpenReport behind the command button rather than calling the macro? And what does the macro do, if anything, except open the report?
    Charlotte

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Query/Report/Macro OK (WIN 2000 Acc 97)

    I wonder how long it would take using VBA.
    Post your database and let us have a look see.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  4. #4
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Sacramento, California, USA
    Posts
    491
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query/Report/Macro OK (WIN 2000 Acc 97)

    Thanks for the replies - just got in to work - I would have responded sooner.

    The DoCmd works fine. But being a curious person as I am, I would like to know why I can click the
    macro (through the db window) and the report opens in 2 seconds.
    When I click the command button with the macro behind it, it takes 2 minutes?? (The macro does nothing
    else other than OpenReport.)

    The part that puzzles me, is that I have 20 buttons on this form. Each button has a macro to open
    a specified report. This is the only report that takes 2 minutes (but only through the form).

    Well, I guess I should be happy that this is solved, but I still wonder why the button takes 2 minutes.

    Thanks for your help !!!

    Michael

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

    Re: Query/Report/Macro OK (WIN 2000 Acc 97)

    Either there's something wrong with your macro or there's something wrong with your form. Objects in Access databases can become corrupted and exhibit strange behavior. That seems to be particularly true of Access 97 on the later versions of Windows. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    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
  •