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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime error '2115'

Status
Not open for further replies.

osx99

Technical User
Joined
Apr 9, 2003
Messages
250
Location
GB
I have a 'modifieddate' field which I am trying to update only when someone makes a change to the data using the following code placed in an event procedure for after update of my form

Private Sub timestamp()
Me!DateRecordModified = Format(Now, "dd/mm/yyyy hh:nn")
End Sub

However, this gives a runtime error 2115 "The macro or function set to the BEforeUpdate or Validationrule property for this field is preventing Microsoft Access from saving the data in the field"

Can anyone help?
Thanks,
Osx
 
You need to trigger this code in the BeforeUpdate event of the form. I think you have it triggered in another event (as suggested by the error).

Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
(dont cut corners or you'll go round in circles)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top