Solved API GetUserName (1 Viewer)

dgreen

Member
Local time
Today, 06:25
Joined
Sep 30, 2018
Messages
397
In my case a user went to Best Buy, got a new hard drive for their laptop and configured it, obviously not to the same standard that the IT would have done. And because of these kinds of situations, I have to acknowledge there are likely to be other occurrences.

They still have the ability to log in to the database remotely via the internet, signing into our SharePoint site.
 

dgreen

Member
Local time
Today, 06:25
Joined
Sep 30, 2018
Messages
397
After the user followed the below path, changed the Owner value to their name and rebooted, I now can see their full name in Access on the Startup form. I think this one is good now.

Control Panel - Administrative Tools - Computer Management - Local Users and Groups - Users
 

HiTechCoach

Well-known member
Local time
Today, 06:25
Joined
Mar 6, 2006
Messages
4,357
[
@HiTechCoach ... It's good that this happened because now I realize that I can't just depend on the UserName field to be unique.
If are two readme.txt files on a hard drive., are they unique? Readme.txt is only the last part of the actual file name since it did not start with a drive letter (c:\...) or resource name (\\sharename\...) to indicating full name (full path). Files are unique when you use the full path.

The user name also has a "full path". It is the format of doaminname\username (%USERDOMAIN%\%USERNAME%)

When a computer is joined to a domain and Active Directory (AD) is maintaining the credentials, then the user names are unique within AD (domain) which makes it very easy.

When you are dealing with workgroups, uniquely identifying a user for Single Sign-On is very difficult.


Code:
Zira.Speak "" & GetGreeting() & Mid(fOSUserName(), 1, InStr(1, fOSUserName(), " ") - 1)

When you have time would you mind sharing about "Zira.Speak "
 

dgreen

Member
Local time
Today, 06:25
Joined
Sep 30, 2018
Messages
397

Gasman

Enthusiastic Amateur
Local time
Today, 12:25
Joined
Sep 21, 2011
Messages
14,255
Well my David sounds feminine? :)

Code:
Option Explicit
Dim Zira, David

'Zira's Voice
Set Zira = CreateObject("SAPI.spVoice")
Set Zira.Voice = Zira.GetVoices.Item(1)
Zira.Rate = 2
Zira.Volume = 70

'David's Voice
Set David = CreateObject("SAPI.spVoice")
Set David.Voice = David.GetVoices.Item(0)
David.Rate = 2
David.Volume = 100

Zira.Speak "My Name is Zira."
David.Speak "My Name is David. It's nice to meet you!"

Set Zira = Nothing
Set David = Nothing
 

Users who are viewing this thread

Top Bottom