Event Capture

  • Thread starter Thread starter nick999
  • Start date Start date
N

nick999

Guest
I was wondering if i someone could answer a problem i am having with event capture. I have designed a form with a location field, serial#number field (PK) and a date_modified field. I want to capture the event of updating the location field with a new timestamp in the date_modified field. I know how to capture the After Update event, but i can't seem to properly update the corresponding date_modified field. All these fields are existing columns in a table called OmniQuest.
 
On your form, when the location field is updated, you should have some code in the After Update event to update the date_modified field as well. Is that not working?
 
I've done something like this on a form used to accept a resolution by a user. I have a Yes/No option group that when yes is selected, the current date is filled into another field. In the AfterUpdate event of my option group:

If OptionGroup = 1 Then

Me.ResCompleteDate = Date
Me.Resolution.SetFocus

The SetFocus line moves the cursor out of the date field so it is updated while I'm looking at it. I guess I wonder if each time the cursor passes through your field it would change the date. You might have to put some conditions on it to look for changes.
 
Something like this in the Locations AfterUpdate event...

Private Sub tbLocation_AfterUpdate(Cancel As Integer)
Me.tbModifiedDate.Value = Format(Now, "mm/dd/yyyy hh:mm:ss")
End Sub

HTH
 
I was hoping i would be able to do it without using VB. I do have experience in programming, but not in VB. Perhaps someone could provide a link for a good website.
 

Users who are viewing this thread

Back
Top Bottom