record update

Danny

Registered User.
Local time
Today, 01:51
Joined
Jul 31, 2002
Messages
157
Greetings,

I’ve designed a database consists of a main form and a subform based on tblHeadOfHouseHold and tblApplicants. I’ve also created an audit trial to track down the user name who last modified the record.
It works fine in the main form (frmHeadOfHouseHold) and updates the last user name who made changes to that record. But, if you make changes in the subform it doesn't update record changes to the main form.

Following is the code I used:

-----********************----
Option Compare Database
Private Function ModifiedInfo()
On Error GoTo ERROR_HANDLER

[LastModifiedBy].Value =
Forms![frmMain]!lblUser.Caption
[TimeModified].Value = TimeValue(Now())
[DateModified].Value = DateValue(Now())

Exit Function
ERROR_HANDLER:
MsgBox (Err.NUMBER & vbCrLf & Err.Description)
Resume Next
End Function
 
Hmm... typically, changes made to records in a sub-form would not be tracked in the table upon which the main form is based. Rather, they would be tracked in the table upon which the sub-form is based.

Are you sure this is what you want to do?
 

Users who are viewing this thread

Back
Top Bottom