Disable Type conversion Error messages

G

Geoff

When running a query I get the message "cannot update one field due to a
type conversion failure" using the DoCmd.RunSql in code. I would like to
suppress this message and am unsure how. The on error resume next doesn't
stop the message. Any suggestions would be greatly appreciated.
 
A

Allen Browne

Try turning SetWarnings off.

Alternatively Execute the query without the dbFailOnError switch, i.e.:
dbEngine(0)(0).Execute "MyActionQuery"

An advantage of the 2nd method is that you can get the number of
RecordsAffected.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top