Computer Learning Zone CLZ Access Excel Word Windows

Employees are the rungs on the ladder of success. Don't hesitate to step on them.

-211th Rule of Acquisition
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Seminars > Security > Lessons
Back to Security Seminar Lessons    Comments List
Security Seminar LoginF Upload Images   Link   Email  
Victor Lugo        
2 years ago
I've been learning so much from this seminar. I work at a very big company, and I'm building a database for my office that would help make our daily tasks more efficient. That's why this seminar is a complete game changer for me. I digress, I would like to establish a way to get the username from the Windows10 account signed in. I can build my UserT with known employees, but I would like to get rid of the need for LoginF altogether.
Simply put, once a user opens the DB, the GlobalModule would read the UserName from the machine and enter it into UserID and UserName fields that are hidden in MainMenuF. If the user isn't listed, they can add their details to a separate UserF that will default add them to a Group with no access to data until a User with Admin privileges manually adds them to the correct group.

I'm sure the experts here can build this in a matter of minutes, but I'm at a loss. I looked online and found the
apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long)

function code, but I have no idea how to make it work. My IT Dept is of no help because the one developer they do have is back logged with tons of higher priority tasking. It would take weeks for him to respond to my ticket request. SO I turn here for help. Maybe this subject would make a great TechHelp Video to promote the Security Seminar. Thanks in Advance.
Alex Hedley             
2 years ago
Environ("USERNAME")
Victor Lugo        
2 years ago
@Alex Hedley
Thank you, very simple answer.
Victor Lugo        
2 years ago

Victor Lugo        
2 years ago
I can't see where my syntax is wrong.
[frmMain_Menu] is grabbing the UserName fine, I've made sure the same UserName in [UserT] matches.
Adam Schwanz             
2 years ago
Adam Schwanz             
2 years ago
"Username=""" & txtusername & """"
Richard Rost             
2 years ago
One of the #1 problems... Concatenation!

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

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/24/2024 8:40:17 AM. PLT: 1s