Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automatic active Save button (2000)

    I am doing an Access report and would like to know if there is a way to automatically active the save button rather than keep having to press it numerous times.
    see attachment.
    Any assistance in this matter would be appreciated.

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

    Re: Automatic active Save button (2000)

    Are you activating the dialog manually, or using code?

  3. #3
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic active Save button (2000)

    Sorry l don't know what you mean by activating the dialog?

    Justin.

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

    Re: Automatic active Save button (2000)

    The screenshot in your post is a "Save As PDF" dialog. How is this dialog opened? Using code or manually?

  5. #5
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic active Save button (2000)

    This is opened using code.

    Justin

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

    Re: Automatic active Save button (2000)

    Could you post the relevant bit of code (the part in which the Save As dialog is opened)?

  7. #7
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic active Save button (2000)

    This is the coding, l use in the event section,l am not to sure which bit exactly you require.
    ==============================================
    Code moved to attachment by HansV

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

    Re: Automatic active Save button (2000)

    My guess is that the relevant part is

    stDocName = "Weekly PDF Reports"
    DoCmd.RunMacro stDocName

    so the next question becomes: what are the contents of the macro named "Weekly PDF Reports"?

  9. #9
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic active Save button (2000)

    These are reports within Access.

    Justin.

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

    Re: Automatic active Save button (2000)

    Yes, I had surmised that. But the lines

    stDocName = "Weekly PDF Reports"
    DoCmd.RunMacro stDocName

    mean that you execute a macro named "Weekly PDF Reports". I would like to know what is in this macro.

  11. #11
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic active Save button (2000)

    see attachment, do you want the actual coding inside the commands?

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

    Re: Automatic active Save button (2000)

    Try the following. It's best to try it out in a small test macro that only prints one report, instead of in the full macro.

    Between the OpenReport and PrintOut actions, insert a SendKeys action with Keystrokes argument {ENTER}

  13. #13
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic active Save button (2000)

    Thanks for that l will try that.

    Justin

  14. #14
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic active Save button (2000)

    That works great.

    Thanks.

  15. #15
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic active Save button (2000)

    For some reason this does not appear to work when l try it out on the actual database rather than the test database, any ideas?
    i.e you still have to click on the "save" button.
    any ideas as to why this is?

    Justin.

Page 1 of 2 12 LastLast

Posting Permissions

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