Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
After Update event on subform
Kevin Rackliff 
      
3 years ago
I have a Sub Form that my users will update certain fields from time to time. When they update a field I would like the Entry Date field on the Master Form to change the date/time to the current date/time. Is there a video that covers this?
Thanks
Kevin Robertson  @Reply  
          
3 years ago
Kevin Rackliff OP  @Reply  
      
3 years ago
Thanks Kevin, I have watched these videos but they didn't help me with what I am trying to do so I am looking for more information and may have to take the Developers training course.
Scott Axton  @Reply  
      
3 years ago
The Value From a Form show you what you need.
On that page shows the syntax:
       Fields on a single form: Forms!FormName!FieldName
       Fields on a subform: Forms!ParentFormName!SubFormName.Form!FieldName

Go watch it again and give it a shot.  Use the included DB that you can download to look at the code.

If that still doesn't help - be more specific on what you want to do.  
When I update X I want Y to happen.  Pictures help a lot.

If you aren't sure how:  Snip & Sketch
Use the Upload Images to the right of the reply box to upload the image.
Kevin Rackliff OP  @Reply  
      
3 years ago

Kevin Rackliff OP  @Reply  
      
3 years ago
Thanks Scott, here is what I am trying to do, screenshots attached.
I have a Parent Form, frmMaskSetDetails and a Sub Form, Mask Plate Details.
The Parent form has a field called Entry Date which is when the record was first created.
The 2 fields in the sub form, Status and Location, will get updated at a later date
What I want to occur is for the field Entry Date to be updated to the current data/time, each time the fields in the sub form are changed.
I want to create an procedure for the After Update Event to do this
Finally, how do I donate to the Tip Jar?
Thanks
Kevin Robertson  @Reply  
          
3 years ago
Go to the Form properties of the Subform, got o Events tab select After Update.

Private Sub Form_AfterUpdate()

    Parent!EntryDate = Now()
    
End Sub


This will update EntryDate on the Parent Form to the current date and time after any field in the Subform is changed.
Kevin Robertson  @Reply  
          
3 years ago
I should also say the field will only be updated when you move off that record.
If you want the update to happen immediately add a Me.Refresh to the After Update event of each field in the Subform.
Kevin Rackliff OP  @Reply  
      
3 years ago
Thanks Kevin
You have EntryDate in your expression but as the field name is Entry_Date i wrote the expression as follows:
Private Sub Form_AfterUpdate()
Parent!Entry_Date = Now()
End Sub
That said, this did not work and produced a Run-time error '2465' MS cant find field 'Entry_Date' refered to in the expression
The Entry_Date field on the Parent form is a text box who's Control Source is in a different table from the subform, not sure if this has anything to do with it.
The expression makes perfect sense to me so not sure why it gives the error
Kevin Rackliff OP  @Reply  
      
3 years ago
Could it be related to the Master/Child fields that link the subform to the form?
Kevin Robertson  @Reply  
          
3 years ago
Probably due to the underscore in your field name. Try enclosing the field name in square brackets.

Parent![Entry_Date] = Now()
Kevin Rackliff OP  @Reply  
      
3 years ago
I tired that, no luck.
As I am still in the design phase of the database I probably should remove the underscore as its a leftover from when I learnt Access years ago in the UK.
Let me do that and see if that resolves the issue
Thanks
Kevin Robertson  @Reply  
          
3 years ago
I just had another look at your image. There appears to be a space before the underscore.
Kevin Rackliff OP  @Reply  
      
3 years ago
That was it, my bad for not checking that.
Thanks for the help and let me know how to donate to the tip jar
Kevin Rackliff OP  @Reply  
      
3 years ago
Tip jar figured out, many thanks for all the help

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

Next Unseen

 
New Feature: Comment Live View
 
 

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: 8/7/2026 11:42:46 PM. PLT: 0s