Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Help with saving a username after login TmpVar
Fred Stetson 
    
2 years ago
I am keeping a log of various user account activities.  Once logged in, I want to save/record that users name in a temp file for use while that user is performing other critical functions that my client wants to log as well.  Such as crucial financial information that someone might delete.  the4y want to knwo who did what and when. I am thinking a public variable that would open during autexec and delete tempfile upon database exit.  

I am using the following code in the login form;

'///logs
Set ulog = CurrentDb.OpenRecordset("tbl_logs", dbOpenDynaset, dbSeeChanges)
With ulog
    .AddNew
    .Fields("logDate") = Date
    .Fields("logTime") = Now()
    .Fields("logActivity") = "Changed Password"
    .Fields("logDetail") = "(" & Me.f_username & ")" & " Used Forgot Password Function "
    .Fields("uID") = uI
    .Update
End With


So, I am hoping you all might have a good resource you could refer me to or provide a suggested process.  

Thank you very much.
Alex Hedley  @Reply  
           
2 years ago
Access Developer 30
Classic VB File I/O. Reading & Writing Text Files
Fred Stetson OP  @Reply  
    
2 years ago
I just finished using TempVar(UserName) = Me.txtActiveUser.Value  on my main navigation form OnLoad and modified  the line oin my code above like this in my delete cmdebutton code;
  
.Fields("logDetail") = "(" & TempVars!UserName & ")" & " Deleted " & Me.uUsername

WORKS GREAT from what I can see, log table shows who, what and when.  NOw to figire out how to get the where (Form NAme of delete command) into that record.
Fred Stetson OP  @Reply  
    
2 years ago
Thanks Alex!  I will review that.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 1:15:02 PM. PLT: 1s