...is the code for the trigger on the table...
CREATE trigger CashReceiptsAudit
on dbo.tblCashReceipts
for update, delete
as
if(select count(*) from inserted)>0
begin
if (select count(*) from deleted)>0
begin
insert tblCashAudit
(
Receipts,
Field,
dtChg,
OldVal...
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...
payback,
Thank you. That was not the exact problem but it did lead to the resolution.
The default printer was some how messed up and re-installing the printer made it work.
Yes the account has full permissions to run the stored procedures / views that the reports are based on. In fact, going behind the scenes all queries can be ran manually. It is only reports, you can not go into design view even on any report under her profile. It really sounds like a setting...
I have a user with what appears to be a local setting issue. On her computer, logged in as administrator all works correctly. Logged in as her, reports will not display in any Access application. Furthermore, I can not even create a report or go into design view, only from her profile...
Ok, I have isolated the problem. When the tech set her up he had the printers all being pushed (don't know if I have the term correct) from the server, but had their "default printer" with admin privilages. When switching to another default pritner it all worked fine...
I was confuszed...
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.