Update another field

kevin19

Registered User.
Local time
Today, 20:57
Joined
Jan 28, 2013
Messages
81
Hi all!
I have a subform with a notes field. Upon creating a new note in the subform, I like to update a Date field in the main form to today. The date field consists of an old date which needs to be automatically updated upon creating the new note.
How can one do this? Anyone help please???
Thanks!
 
Try the Sub form's Before Update event, test if it is a New record update the fields of the mainform.. Something along the lines of..
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
    If Me.NewRecord Then Me.Parent![COLOR=Blue]dateControlName[/COLOR] = Date
End Sub
 
Thanks for your prompt response!
Tried it but afraid it is not working....I am using MS Access 2007.
??
 
Is the control in the form being set in the first place? Try some debugging and see if they work..
 
the date is set in the control source. I just need to automatically change this date to today's date once I have edited or created a new record from the subform. The date is in the main form.
Thanks!
 

Users who are viewing this thread

Back
Top Bottom