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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try just DoCmd.OpenQuery "query_name"
Try just DoCmd.OpenQuery "query_name"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
They replaced acNormal with acViewNormal
I don't know why everything's coming out twice!
Almost everything!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
Good luck with the rest of your project(s)
Dave