Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Last Modified

Status
Not open for further replies.

Elvis72

Technical User
Dec 6, 2007
211
US
OK, I have a Main Form with several tabs and subforms.

On the Main Form I have a Text box: Text153 which is linked to Date Last Modified in my Resumes Table.

Then I have this event on After Update:

Private Sub Form_AfterUpdate()
Me.Parent.Text153 = Now()
End Sub

Which was working fine but now seems to throw this error:


You Can't assign a value to this object and Highlights:


Me.Parent.Text153 = Now()


I'm not getting what I changed or did that would make it stop working all of the sudden?
 

First off, Access error messages are not known for accurately explaining the real problem. That said, I have to wonder how this code ever worked! Assigning a value to a textbox in the Form_AfterUpdate event like this causes an unending loop. When Text153 is assigned a value, the Form_BeforeUpdate event fires again, then the Form_AfterUpdate event, then the Form_BeforeUpdate event and so forth!

Try placing the code in the Form_BeforeUpdate event.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Then I have this event on After Update
event of which object ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I have multiple subforms that can be updated that have this code so we knoe when a record has been modified.

A Few of the Subforms are:

Project Information
Language
College/University
Experience
Memberships
Etc.

Each of these has the event.

Is there a better way to look at every field and every subform to reflect a Date Last modified?

Missingling -

I will try in the before update...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top