docmd.runSQL

R

Ron Sissons

I want to bypass access asking me if I want to do this.

ex:"You are about to append 1 row. Are you sure?"

what is the syntax for this?

Rsissons

Ron Sissons, DBA
Information Technology Services
Riverside County Office of Education
3939 Thirteenth Street, Riverside, CA 92502-0868
Telephone: (909) 826-6471; FAX: [909] 826-6451
 
R

Rick Brandt

Ron Sissons said:
I want to bypass access asking me if I want to do this.

ex:"You are about to append 1 row. Are you sure?"

what is the syntax for this?

Instead of DoCmd.RunSQL "SQL Statement"

use

CurrentDB.Execute "SQL Statement", dbFailOnError
 
F

fredg

I want to bypass access asking me if I want to do this.

ex:"You are about to append 1 row. Are you sure?"

what is the syntax for this?

Rsissons

Ron Sissons, DBA
Information Technology Services
Riverside County Office of Education
3939 Thirteenth Street, Riverside, CA 92502-0868
Telephone: (909) 826-6471; FAX: [909] 826-6451

As well as using CurrentDb.Execute, you could also use:

DoCmd.setWarnings False
DoCmd.RunSQL "Your SQL here"
DoCmd.setWarnings True
 

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

Similar Threads


Top