docmd.runSQL

  • Thread starter Thread starter Ron Sissons
  • Start date Start date
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
 
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
 
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
 
Back
Top