Thanks Jim,
I will definately look at that. BTW, I just finally figured out how to get the trigger to work and can audit updates and deletes directly on the table level... Here is the code for the trigger on the table...
CREATE trigger CashReceiptsAudit
on dbo.tblCashReceipts
for update...
Jim,
I really appreciate your help. What you are saying is what I thought was the case.
I put this statement on the subform's Before Update event:
Call basLogTrans(Forms!frmCashJournalPopup!frmCashJournalSub.Form, "Receipts", Receipts)
Where the main form is frmCashJournalPopup and hte...
Ok, I can't seem to make this work. Maybe do not understand what you mean by control name. The forms name is frmCashJournalSub.... How would I find out if this is in fact it's control name?
If I put this type of code on the After Update event:
DoCmd.SelectObject acForm, "Forms!frmCashJournalPopup!frmCashJournalSub.Form"
Call basLogTrans(Forms!frmCashJournalPopup!frmCashJournalSub.Form, "Receipts", Receipts)
I get an error 2489, the object...
Hello Jim,
Tracing through, each of the ctrls are checked by calling the basActiveCtrl function, however it never calls the basAddHist function which would write the data to the table. It appears as if the check for data change:
If ((MyCtrl.Value <> MyCtrl.OldValue) _
Or...
Ok, I tried putting the code on the subforms AfterUpdate event. I do not get any errors, however the changes are not recorded in the History table either.
Here is the code I am using...
Call basLogTrans(Forms!frmCashJournalPopup!frmCashJournalSub.Form, "Receipts", Receipts)
Where...
On the Before Update event on either the form or an individual field:
-----------------------------------------------------------
Call basLogTrans(Me, "Key Filed Name", KeyField)
The function:
-----------------------------------------------------------
Public Function basLogTrans(Frm As...
Hello All,
I use SQL databases and Access front ends mainly connecting through ODBC.
Is there an easy way of tracking (auditing) changes made in the system? What I want is basically User A changes table B on date, old value is, new value is.
I have a method that can do this using a...
Ok, as a follow up. The fOSUserName() does not work if you are setting a user name to a bound field. For example, I have a field where the user who entered the record is stored. Therefore the field is bound to a record. Setting this field when a new record button is clicked using...
In Windows XP this returns the user name because on my computer for example, the computer name is the asset number but my login is my name. When I use this my name is inserted in the field.
I will experiment with your method also. If is is more reliable then all the better.
Thanks, I had already figured this out. name is a reserved word so relabeling the field to name1 for example worked, therefore on the click event I put this code:
name1 = Environ("USERNAME")
Thanks for the responses.
As a test I tried creating a quick form with a textbox and a button. The textbox name is name and on the click event of the button I put this code as a test:
Dim uname As String
uname = Environ("USERNAME")
Me.name = uname
This results in and error "The property is read-only and can't be...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.