Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > Courses > Access > Developer > D09 > Test Taker Info Warning by Matthew Pendleton >
Back to Access Developer 9    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Test Taker Info Warning
Matthew Pendleton 
     
4 days ago
I am working through the test taker database in developer series. When I press the begin test button, I get an information message box pop up saying I am about to append a row. Selecting yes runs the SQL. Selecting no creates an error. "Runtime error 2501, RunSQL action was cancelled." I have replicated the code in the instruction video exactly. The video never prompts the user for a yes/no action. What am I doing wrong?
Kevin Robertson  @Reply  
          
4 days ago
Click Debug and change the highlighted code to this:

    On Error Resume Next
    DoCmd.RunSQL S
    On Error GoTo 0
Richard Rost  @Reply  
           
4 days ago
Yeah, I'm pretty sure this was covered in one of the earlier classes. DoCmd.RunSQL has confirmation warnings enabled by default, which is why you're seeing the "You are about to append..." message. Clicking No cancels the action and produces error 2501.

Kevin's fix will suppress the error, but I generally prefer using CurrentDb.Execute for action queries now. It doesn't display the Access confirmation prompt in the first place, and it gives you better control over error handling.

Yes, even I learned a thing or two over the production of this course that spans 20+ years. LOL. There's nothing wrong with using RunSQL, but Execute will bypass all that warning nonsense.

RunSQL v Execute
Matthew Pendleton OP  @Reply  
     
24 hours ago
CurrentDb.Execute is new for me and worked great. Thank both of you for sharing.
Add a Reply Upload an Image
Next Unseen

 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 9/10/2026 3:15:38 PM. PLT: 1s