Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by RandyMyers

  1. RandyMyers

    audit history

    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...
  2. RandyMyers

    audit history

    Oh, on the main menu the subform's name is in fact frmCashJournalSub... I verified this as you stated...
  3. RandyMyers

    audit history

    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...
  4. RandyMyers

    audit history

    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?
  5. RandyMyers

    audit history

    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...
  6. RandyMyers

    audit history

    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...
  7. RandyMyers

    audit history

    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...
  8. RandyMyers

    audit history

    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...
  9. RandyMyers

    audit history

    I have never used triggers. Would you please give me a quick example of how this would work. I am sure I could expand from there.
  10. RandyMyers

    audit history

    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...
  11. RandyMyers

    Windows user login

    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...
  12. RandyMyers

    Windows user login

    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.
  13. RandyMyers

    Windows user login

    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.
  14. RandyMyers

    Windows user login

    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...
  15. RandyMyers

    Windows user login

    How can I have the current Windows user login automatically entered into a field on a form?

Part and Inventory Search

Back
Top