No video

What's the Difference Between DoCmd.RunSQL and CurrentDb.Execute in Microsoft Access

  Рет қаралды 5,618

Computer Learning Zone

Computer Learning Zone

Күн бұрын

In this Microsoft Access tutorial, I'm going to teach you the difference between DoCmd.RunSQL and CurrentDb.Execute and when you would want to use each.
Mike from Newcastle, England (a Platinum Member) asks: I've been following your Microsoft Access videos for years, and you used to always use DoCmd.RunSQL in your code. But recently, I've noticed you using CurrentDb.Execute instead. What's the difference between the two, and what should I use?
Silver members and up get access to an Extended Cut of this video. Members will learn how to trap errors in db.Execute commands with the dbFailOnError parameter. We will also learn how to count how many records were affected with any SQL command by using the RecordsAffected property.
MEMBERS-ONLY EXTENDED CUT VIDEO:
• RunSQL vs. Execute EXT...
BECOME A MEMBER:
KZbin: / @599cd
or My Site: 599cd.com/THMe...
LEARN MORE:
RunSQL vs Execute: 599cd.com/RunS...
PREREQUISITES:
SQL with Access: 599cd.com/SQLw...
Action Queries: 599cd.com/Acti...
Intro to VBA: 599cd.com/Intr...
LINKS:
Turn Off Warnings: 599cd.com/SetW...
Value From a Form: 599cd.com/Form...
Error Handling: 599cd.com/Erro...
RECOMMENDED COURSES:
Access SQL Seminars: 599cd.com/SQL
Access Developer Courses: 599cd.com/Deve...
RICK'S PICKS:
No Longer Set: nolongerset.com...
DEVelopers HUT: devhut.net
Access Forever: accessforever.org
Denver Area Access Users Group: daaug.org
Access User Groups: accessusergroup...
FREE TEMPLATE DOWNLOADS:
TechHelp Free Templates: 599cd.com/THFree
Blank Template: 599cd.com/Blank
Contact Management: 599cd.com/Cont...
Order Entry & Invoicing: 599cd.com/Invo...
More Access Templates: 599cd.com/Acce...
ADDITIONAL RESOURCES:
FREE Access Beginner Level 1: 599cd.com/Free1
How to Use Access in 30 Minutes: 599cd.com/30Mi...
$1 Access Level 2: 599cd.com/1Dollar
Donate to my Tip Jar: 599cd.com/TipJar
Get on my Mailing List: 599cd.com/YTML
Contact Me: 599cd.com/Contact
TechHelp: 599cd.com/Tech...
Consulting Help: 599cd.com/DevNet
Twitter: / learningaccess
en.wikipedia.o...
products.offic...
microsoft.com/...
KEYWORDS:
access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, What is the difference between docmd.runsql and currentdb.execute, Execute vs RunSQL, CurrentDb.Execute vs. docmd.runsql, suppress warnings, handle errors, dbFailOnError, RecordsAffected, run-time error 3061, too few parameters expected 1
QUESTIONS:
Please feel free to post your questions or comments below. Thanks.

Пікірлер: 11
@FlacoSalsero
@FlacoSalsero 11 ай бұрын
Thanks Richard for the great tips. You're kinda like a life coach for Access developers!
@stuartround
@stuartround 11 ай бұрын
I've always used db.execute, but never really looked or understood the difference. This is what I love about your videos, it's great to cover "basics" that I may have completely missed.
@Shadow.Dragon
@Shadow.Dragon 11 ай бұрын
Richard, thanks for the comparison of RunSQL and Execute!
@xavierbatlle1828
@xavierbatlle1828 11 ай бұрын
Very intetesting topic! I've using recordsets if I wanted to trap errors instead of currentdb. Execute.
@SavedbyGraceCT
@SavedbyGraceCT 7 ай бұрын
Thank you for this explanation!
@599CD
@599CD 7 ай бұрын
You're very welcome!
11 ай бұрын
Do you teach how to create DLL for Access?
@alializadeh8195
@alializadeh8195 11 ай бұрын
Thanx
@kamran133
@kamran133 3 ай бұрын
Still have not posted ant video about CurrentDb.Execute transaction?
@Rogues4Ever
@Rogues4Ever 7 ай бұрын
Heard "Es -Que-El" in the first 20 seconds. I'm out.
@599CD
@599CD 7 ай бұрын
See ya! Don't let the door hit you on the way out... :P
AutoSave Form Data at Timed Intervals in Microsoft Access
15:01
Computer Learning Zone
Рет қаралды 1,9 М.
Understanding the DAO Object Library in VBA Code
13:16
Pharos Technology
Рет қаралды 801
Magic? 😨
00:14
Andrey Grechka
Рет қаралды 19 МЛН
Can This Bubble Save My Life? 😱
00:55
Topper Guild
Рет қаралды 84 МЛН
Cute kitty gadgets 💛
00:24
TheSoul Music Family
Рет қаралды 12 МЛН
Using Option Groups in Microsoft Access: Procedure Tracking
22:02
Computer Learning Zone
Рет қаралды 6 М.
How Build Invoce Management System In MS ACCESS.
16:26
Ag tech
Рет қаралды 17 М.
Executing stored procedures with parameters - MS ACCESS
27:45
JACK PANYAKONE
Рет қаралды 1 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 354 М.
The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021
1:00:41
NDC Conferences
Рет қаралды 1,3 МЛН
A Better Solution Than the On Filter Event in Microsoft Access Forms
29:42
Computer Learning Zone
Рет қаралды 5 М.
Debugging Tools for VBA in Microsoft Access: A Comprehensive Guide
10:03
How to Create and Modify QueryDefs Programmatically in your MS Access Database
12:03
Sean MacKenzie Data Engineering
Рет қаралды 4,6 М.
Magic? 😨
00:14
Andrey Grechka
Рет қаралды 19 МЛН