Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Run query on open (2002)

    Help. I need to run a couple of update queries (from external tables), when the DB is opened, to make sure I have the most up to date data. I used to use macros, with SendKeys to action dialogue boxes on the 2000 version, but on 2002, this does not work.

    Help please.
    TIA

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

    Re: Run query on open (2002)

    Are you using SendKeys to reply Yes to the warning that you are about to execute an action query and that you are about to update n records? If so, it's better to use the SetWarnings action with argument No before running the update queries, and SetWarnings with argument Yes after.
    If this doesn't apply to your situation, please provide more information.

  3. #3
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run query on open (2002)

    Hans, thank you for the prompt reply. You have hit on the crux of the issue, I'd used the sendkeys to reply to the warnings. However, there are numerous depths to Access I've yet to get anywhere near, & the I had no idea about this one. I'll have a bash with it & let you know.
    Thanks

  4. #4
    4 Star Lounger
    Join Date
    May 2001
    Location
    Oxfordshire
    Posts
    456
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Run query on open (2002)

    Thanks Hans, it was exactly what I wanted & it worked a treat.
    Cheers

Posting Permissions

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