Windows 10 Coming Soon
Tips & Tricks
Windows Forum
Course Index
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Database Security Seminar    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Windows API for Logon Name
Richard Rost 

16 years ago
One of my students, Julius, emailed to remind me that there is a Windows API call you can use to pull up the logon name of the person currently logged in to WINDOWS using this function:

Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long

This would allow you to use it as an extra level of security to make sure that the person accessing the database is at least the person logged on to Windows... or just even use it to set the default value for your database logon form's username field.

I don't have a whole lot of time right now to give you a full explanation of its use, but if anyone is interested, post here and perhaps I'll add this as a lesson (or at least more description of how it works).

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

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/8/2026 3:33:33 AM. PLT: 0s