Рет қаралды 5,618
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.