Re: Getting NT User Login Names from Access 2000 or 2003
- From: "Jeff Conrad" <jeffc@xxxxxxxxxxxxxxxxx>
- Date: Wed, 22 Jun 2005 13:45:02 -0700
Humor me here.
Create a new blank form and put this code in the Open event.
Private Sub Form_Open(Cancel As Integer)
MsgBox fOSUserName()
End Sub
What does the message box say?
Any extra spaces?
--
Jeff Conrad
Access Junkie
http://home.bendbroadband.com/conradsystems/accessjunkie.html
http://www.access.qbuilt.com/html/articles.html
"Michael Miller" wrote in message:
news:3B25DD23-EBE4-4137-B56D-C2605A855261@xxxxxxxxxxxxxxxx
> Nothing is missing and it does find MMILLER, but has over 200 spaces after it.
> The additional spaces will not allow it to be assigned to a field.
>
> This code does match the user name with a string value tho, even given the
> spaces:
> Select Case LCase(fOSUserName())
>
> Case "mmiller"
> cmdDeveloperClose.Visible = True
> cmdStarsUpdate.Visible = True
> lblHello.Visible = True
> lblHello.Caption = lblHello.Caption & " Michael"
>
> --
> MichaelM
>
>
> "Jeff Conrad" wrote:
>
> > Sounds like maybe a References problem. See:
> >
> > http://home.bendbroadband.com/conradsystems/accessjunkie/references.html
> >
> > Post back with results.
> > --
> > Jeff Conrad
> > Access Junkie
> > http://home.bendbroadband.com/conradsystems/accessjunkie.html
> > http://www.access.qbuilt.com/html/articles.html
> >
> > "Michael Miller" wrote in message:
> > news:2A04C5B6-B320-48AC-AFA7-96FE3B0F571F@xxxxxxxxxxxxxxxx
> >
> > > I have a function called fOSUserName, that I found, to get the login name of
> > > the person, when they open my main form.
> >
> > [code snipped]
> >
> > > Problem is that it's returning mmiller followed by a bunch of square boxes.
> > > The Left$ (in the code) and a try of Trim and a LTrim(RTrim()) is not fixing
> > > it. When I try to assign it to a field in a log table, it always says that
> > > my data is too big for the field.
> > > When I assign it to a label, it shows up fine, as the boxes are not visible.
> >
> >
> >
.
- Follow-Ups:
- Re: Getting NT User Login Names from Access 2000 or 2003
- From: Michael Miller
- Re: Getting NT User Login Names from Access 2000 or 2003
- From: Michael Miller
- Re: Getting NT User Login Names from Access 2000 or 2003
- References:
- Getting NT User Login Names from Access 2000 or 2003
- From: Michael Miller
- Re: Getting NT User Login Names from Access 2000 or 2003
- From: Jeff Conrad
- Re: Getting NT User Login Names from Access 2000 or 2003
- From: Michael Miller
- Getting NT User Login Names from Access 2000 or 2003
- Prev by Date: Need help designing form in Access 2003 that searches for value
- Next by Date: Re: Getting NT User Login Names from Access 2000 or 2003
- Previous by thread: Re: Getting NT User Login Names from Access 2000 or 2003
- Next by thread: Re: Getting NT User Login Names from Access 2000 or 2003
- Index(es):
Relevant Pages
|
Loading