Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Forums > Developers
Back to Access Developer Forum    Comments List
Upload Images   Link   Email  
Error Update or CancelUpdate
Larry Foley 
    
10 months ago
The Error is: "Update or CancelUpdate without AddNew or Edit".
I have simple code attached to a textbox AfterUpdate Event. The code assigns a value to the textbox. The code runs as expected without any problem.
However (there's always a However) I also have code to duplicate a record using a series of DoCmd.RunCommand statements. This code has been running fine for a few years until I added the textbox AfterUpdate subroutine. The last statement is DoCmd.RunCommand acCmdPaste. After acPaste, Access cycles through all of the code attached to different controls in the form. When it gets to the textbox AfterUpdate code, I get the error. Statements assigning values to variables in the subroutine run. The statement assigning a variable to the textbox on the form gives the error, but only during the Duplicate Record sequence. I can provide the simple code if anyone is interested.
In General, it would be interesting to know the sequence of events that Access executes "behind the scenes" in different events. I was not able to find this on Google. Thanks,
Sami Shamma 
             
10 months ago
please send that portion of the code.
Larry Foley OP 
    
10 months ago

Larry Foley OP 
    
10 months ago
I wrote comments with the code. If you want a Word or Note file, please let me know.

On another note: There were other incidents where errors were generated when a form opens and there was no way of seeing where the problem was. Would Mr. Rost make a video explaining the "behind the scenes" sequence that Access executes when a form opens.  Thanks again.
Richard Rost 
            
10 months ago
Hi Larry, I've got several videos that go over in detail what events fire and in what order. For example, in the Access Advanced Level 1 Lesson 4, I cover all of the different form opening events.
Richard Rost 
            
10 months ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 12/5/2024 12:17:20 AM. PLT: 1s