Link to home
Start Free TrialLog in
Avatar of pwwood
pwwood

asked on

DoCmd.SetWarnings False doesn't prevent Action Query prompts

I have a little bit of code which ran perfectly in Access 2000 but when it's run in 2002/3 it throws up a prompt for every append the query makes to the table

    DoCmd.SetWarnings False
    mySQL = "DELETE * FROM table_name"
    DoCmd.RunSQL mySQL
    DoCmd.OpenQuery "query_name", acNormal, acEdit
    DoCmd.SetWarnings True

Am I missing something, it blocks all the other warnings, just not the append. Alternatively, is there any way of turning the Access program Action queries option on and off programatically?
SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try just DoCmd.OpenQuery "query_name"
Try just DoCmd.OpenQuery "query_name"
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
They replaced acNormal with acViewNormal
I don't know why everything's coming out twice!
Almost everything!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pwwood
pwwood

ASKER

This is sooo embarrassing. The error wasn't with this bit of code, it was further down the module where I was copying from one table to another. However as all your comments forced me to look at the code again in a different way, you all helped. I gave tbsgadi the extra point for posting so many times :o)
LOL.. Glad you got it working.

Good luck with the rest of your project(s)

Dave