Re: Getting NT User Login Names from Access 2000 or 2003
- From: "Michael Miller" <MichaelMiller@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Jun 2005 10:49:05 -0700
sorry for the confuzion.
> From your description it almost sounds like it did not work and then it did.
> Which is it?
the tests were done on a different machine, and a blank form and new table.
not sure about dirtying record 1, i thought i did and the username was not
presented nor in the table. but when i created record two, then it worked.
and now, i -just- went back in and deleted both records and loaded the form
and it -showed- my name without having to dirty the other field, and stored
it when I typed in text in someotherfield. So. all that works
> If you assign it to a string variable and then push the value in, that should
> work as well.
this was done in my main machine, since i had all the code set up, and that
does not work and a Watch shows the var has the boxes in it. When I get
time, i can recreate it in the blank database, per all your other thoughts.
I agree, it shouldn't be happening. I will have to try to follow up with
you at some future point
--
MichaelM
==================================================
"Jeff Conrad" wrote:
> "Michael Miller" wrote in message:
> news:D6F37B2E-3AF8-46F0-B240-4C9E2FC58CCD@xxxxxxxxxxxxxxxx
>
> > First, THANK YOU for sticking with me. It means a lot (as I need this func
> > to work) and is educational at the same time. BTW, after these tests you're
> > giving me, do I get MS Certified? :o)
>
> You're welcome, it is no trouble.
> MD Certified? Probably not.
> But you will be an Access Junkie.
> ;-)
>
> > 1. regarding getting fresh code from the web, I did that (that's where I
> > got my orig code) and defaulted the field and it does come up with my Name,
> > and I was not able to 'arrow' past my name, inferring that it is trimmed ok
> > (but not sure it could be 'assigned' to a field).
>
> Good.
>
> > 2. In the table setup and adding the bound SomeOtherField field to the
> > form, plus binding the orig MyUserName field, defaulted to fOSUsername(), to
> > the table.
> > The orig field, now bound to the MyUserName field, does not show my network
> > name anymore. Is that what you intended, using the username field as
> > defaulted -and- bound to the table field? Oops! Just got the default to
> > show up. Had to move to record 2 and made a manual entry to someotherfield.
> > Now my username does show up, cannot arrow to the right, changed the fld size
> > to 10 chars and tried again (cuz the square boxes/extra spaces would not fit
> > in 10 chars) and it still worked.
>
> I'm still a little confused here.
> You are performing this test on a completely *different* blank database, correct?
> When I say blank, I mean just our one test table and form with the specifics I
> provided, correct?
>
> My test scenario previously provided should show the User name *text box*
> on the form will automatically show the Network User Name. As you dirty
> the record the user name will get saved back to the table since we have bound
> it to the table field.
>
> From your description it almost sounds like it did not work and then it did.
> Which is it?
>
> > I will do a new test on my orig machine and get back to you again.
> > What will happen in your scenario, if I tried to assign the func to a strvar
> > and then assign it to the field, in code? That's the problem with my logging
> > of users.
>
> If you assign it to a string variable and then push the value in, that should
> work as well.
>
> > 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.
>
> You are really going to have to provide more specifics on exactly
> the setup you have. Table field properties, form code, module code, etc.
>
> If you import just that table, form and module code into a new database
> container does it still not work? You may need to bring in additional elements
> if necessary, but I'm seeing if you can reproduce this problem without all
> the other database elements around.
>
> > 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.
>
> I don't like this idea and I do believe it should be necessary.
>
> > 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 don't like this idea either.
>
> > 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.
>
> This code *should* work just fine. It has been time tested for a long time.
> The two possibilities I see are:
> 1. There is something in your current setup that is interfering.
> 2. There is possibly some corruption in your database.
>
> I'm really starting to think option two may be a distinct possibility.
> What happens if you import everything into a new database container.
> Still the same problem?
>
> --
> Jeff Conrad
> Access Junkie
> http://home.bendbroadband.com/conradsystems/accessjunkie.html
> http://www.access.qbuilt.com/html/articles.html
>
>
>
.
- 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
- 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: Format Date and Time
- 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
|