Re: Getting NT User Login Names from Access 2000 or 2003
- From: "Michael Miller" <MichaelMiller@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Jun 2005 09:06:03 -0700
Well, I went back to the main machine, and it will not assign the field as is.
Also, a Watch, of the variable, does show the boxes after that value.
However, I think I have a workaround. I went into my real target table, and
changed the fld size to 255. It assigned the value, and I cannot 'arrow'
past the end of my name. I will just have to verify that with a query
linking my name, to a static list with my name in it, to see if it matches up.
Also, as I may have mentioned, my routine of getting the username into a
Case stmt, and displaying 'Michael' if the username is mmiller, does work
under the old scheme. So, in that case the extra box chars are ignored. Go
figure.
I think we can close this, as long as the workaround works, but if you can
find out why (if you view the value of strusername, do you see the boxes as I
do?) this happens and how to fix it, I would still like to know, if you
remember me.
--
MichaelM
"Jeff Conrad" wrote:
> Most peculiar.
>
> Humor me some more.
>
> 1. What happens on a different machine with a different user name?
> Same problem or no problems?
>
> 2. Create a completely new blank database.
> Copy and paste the code from here (not the code you have)
> in to a new standard module (not a form's class module):
>
> http://www.mvps.org/access/api/api0008.htm
>
> Create a new test form with text box that has a Default Value
> of
> =fOSUserName()
>
> Does it display properly?
>
> Create a new table called Table1 with these fields:
> IDField Autonumber (PrimaryKey)
> MyUserName Text
> SomeOtherField Text
>
> Save the table.
> Open the form in Design View and set the Record Source of the
> form to Table1. Set the Control Source of your text box to
> MyUserName so it is bound. Bring down the SomeOtherField
> from the Field List so you have two text boxes now.
>
> Save the form.
>
> Now open the form in regular mode.
> Does the User Name display correctly?
>
> Enter something into the other text box to dirty the record.
> Does the User Name get saved correctly to the table now
> or does it still have all the extra stuff?
>
> --
> 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:C3145DFB-FF94-4DBB-AF81-D521B8F175A1@xxxxxxxxxxxxxxxx
>
> > Ok, made the form and you cannot see the spaces in my username in a msgbox,
> > so I made it with a strUserName variable, and when I step thru the code -I
> > can- see the square boxes after my username, just as in my real form.
> > --
> > MichaelM
> >
> >
> > "Jeff Conrad" wrote:
> >
> > > 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?
>
>
>
.
- Follow-Ups:
- 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
- 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
- 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
- Re: Getting NT User Login Names from Access 2000 or 2003
- From: Jeff Conrad
- Getting NT User Login Names from Access 2000 or 2003
- Prev by Date: Re: Multiple Records Selected
- Next by Date: Re: Multiple Records Selected
- 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