K
KevinK
I have a Master Item form. This displays all the information on an item in
inventory. The header of this form contains 3 filters the first filter sets
the category (china, crystal, pottery, etc.). The next filter sets the
manufacturer and the last filter sets the pattern. In the body of the form I
have 2 fields to log when the current item was last updated. The code I use
is this;
Private Sub Form_AfterUpdate()
On Error GoTo AfterUpdate_Err
'Set bound controls to system date and time
DateModified = Date
TimeModified = Time()
AfterUpdate_End:
Exit Sub
AfterUpdate_Err:
MsgBox Err.Description, vbCritical & vbOKOnly, _
"Error Number " & Err.Number & " Occurred"
Resume AfterUpdate_End
End Sub
I tried this code in the before update event, but the filters would not
work.
With the current code, when I update a record, it disable going to the next
or previous record and I get an error that the record cannot be saved, even
though it does save the date and time.
inventory. The header of this form contains 3 filters the first filter sets
the category (china, crystal, pottery, etc.). The next filter sets the
manufacturer and the last filter sets the pattern. In the body of the form I
have 2 fields to log when the current item was last updated. The code I use
is this;
Private Sub Form_AfterUpdate()
On Error GoTo AfterUpdate_Err
'Set bound controls to system date and time
DateModified = Date
TimeModified = Time()
AfterUpdate_End:
Exit Sub
AfterUpdate_Err:
MsgBox Err.Description, vbCritical & vbOKOnly, _
"Error Number " & Err.Number & " Occurred"
Resume AfterUpdate_End
End Sub
I tried this code in the before update event, but the filters would not
work.
With the current code, when I update a record, it disable going to the next
or previous record and I get an error that the record cannot be saved, even
though it does save the date and time.