Environ(x) doesn't work for 1 user

I use Environ("username") to assign the network username to a variable.
This works great except for one single user and it returns an error.

I wrote a little function to print all the user environ variables and it 
works for that user, all the Environ variables are there.

But I can't set any textbox to an Environ.

All of her references match mine.  We reinstalled Access - it's Access 03.

I don't know where to go from here.

Again, all other users have no problem.
-- 
Regards
   Larry
0
Utf
4/2/2010 9:49:01 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

2 Replies
843 Views

Similar Articles

[PageSpeed] 57

While I don't have an answer to your specific problem, my advise would be 
never use Environ("username") for anything, because it can be hacked so 
easily. Instead, use the GetUserName API call, as illustrated in 
http://www.mvps.org/access/api/api0008.htm at "The Access Web"

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Larry" <Larry@discussions.microsoft.com> wrote in message 
news:9E03B9F3-18DF-46E7-8AA9-84961E55EFD3@microsoft.com...
>I use Environ("username") to assign the network username to a variable.
> This works great except for one single user and it returns an error.
>
> I wrote a little function to print all the user environ variables and it
> works for that user, all the Environ variables are there.
>
> But I can't set any textbox to an Environ.
>
> All of her references match mine.  We reinstalled Access - it's Access 03.
>
> I don't know where to go from here.
>
> Again, all other users have no problem.
> -- 
> Regards
>   Larry 

0
Douglas
4/2/2010 10:16:04 PM
Thanks Doug - works for me of course. I'll have to wait till monday to make 
sure it takes care of that user.  In the meanwhile I'll be changing all my 
other code to use your suggested function.  Much better than Environ!

Thanks again.
-- 
Regards
   Larry


"Douglas J. Steele" wrote:

> While I don't have an answer to your specific problem, my advise would be 
> never use Environ("username") for anything, because it can be hacked so 
> easily. Instead, use the GetUserName API call, as illustrated in 
> http://www.mvps.org/access/api/api0008.htm at "The Access Web"
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> 
> "Larry" <Larry@discussions.microsoft.com> wrote in message 
> news:9E03B9F3-18DF-46E7-8AA9-84961E55EFD3@microsoft.com...
> >I use Environ("username") to assign the network username to a variable.
> > This works great except for one single user and it returns an error.
> >
> > I wrote a little function to print all the user environ variables and it
> > works for that user, all the Environ variables are there.
> >
> > But I can't set any textbox to an Environ.
> >
> > All of her references match mine.  We reinstalled Access - it's Access 03.
> >
> > I don't know where to go from here.
> >
> > Again, all other users have no problem.
> > -- 
> > Regards
> >   Larry 
> 
> .
> 
0
Utf
4/3/2010 12:13:01 AM
Reply:

Similar Artilces:

Does the 2009 Language Pack work with Word 2010 Beta?
I finally got it to install but it appears not to have Italian which is the language I need. Does the 2009 Language Pack work with Word 2010 Beta or am I out of luck? I doubt that the language packs of Office 2009 would work with the new version. If some language packs aren't offered now, I'm sure they will be once Office 2010 is released. -- Stefan Blom Microsoft Word MVP "SStraveler" <SStraveler@discussions.microsoft.com> wrote in message news:5BA3BC6D-8151-460A-815F-30769136F9B6@microsoft.com... >I finally got it to install but it ap...

Different user email accounts
We are running MS Outlook 2007. We have two email accounts for me and my partner, one is a primary and one is a secondary account. How do we each log onto our respective accounts independently. At the moment I can get to the primary account, and send an email via the secondary account. However I would like them to be totally separate accounts. make separate profiles - right click on the start menu icon and choose properties or go to control panel, mail to open the dialog that allows you to create a new profile. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 2...

Update retirement accounts not working
I just started having a strange problem trying to update my retirement account vs. my quarterly statement. (More investing tasks...Update Retirement Account) I have done this dozens of times over the laste few years with no problems. Now, when I enter in all the summary data from my paper statement and click on Finish, Nothing happens, it gives no error and acts like it did the update, but nothing shows up in my register at all. It actually acts like I clicked on the postpone button, becase if I try and do it again, all the data I entered in is still in the input forms, but again not...

Multiple users #6
My wife and I share one computer and would like to each have their own contact list, calendar, mail. We are running XP Pro and Office 2000. Is it possible to have two separate profiles? When I create a new profile, I cannot assign it to her document settings...all I'm able to do, is create the new personal folder, but how can I populate it with a calendar, contacts, etc.? How can I get her acct actually act like a second acct? About the only thing we can seem to have personal, is the desktop...is this a limitation of only having a single license? Thanks in advance, Rob RJ...

Environment variables
Are Windows XP x64 %environment variables% available to Excel and VB equations? The general answer is yes, but you need to understand that there are different views of the filesystem and registry for 32-bit programs as compared to 64-bit programs and the OS. This also affects things like ODBC sources as well. -- Charlie. http://msmvps.com/blogs/russel <johnsuth@nospam.com.au> wrote in message news:c1.2c.3KklPW$0TR@PC1.BIGPOND.COM... > > Are Windows XP x64 %environment variables% available to Excel and VB > equations? > > ...

Auto copy data from 1 sheet into another
Is this possible? I have a spreadsheet with over 30 worksheets in it. Each sheet is individualized with names and personal information in it. I have a summary worksheet that lists everyone's name and a running total of numeric values. I need a new worksheet that I can use to type names into a list. As I type in the person's name, can excel pull the running total value from the summary sheet? Example: Name Number John Doe 8 (value from summary worksheet cell:B7) Jane Doe 36 "" "" cell:B8 M...

Format changes when another user opens presentation
why do fonts change size when another user opens a shared presentation. Font size overflows the text box, the text is either too big or too small and unwraps so it goes off the slide, but when I open on my system, it's fine!? On 12/15/09 9:15 AM, in article 79A48B55-8B9D-4F5D-A21B-EF1C84D07AD2@microsoft.com, "Shevvie" <Shevvie@discussions.microsoft.com> wrote: > why do fonts change size when another user opens a shared presentation. Font > size overflows the text box, the text is either too big or too small and > unwraps so it goes off the slide, but...

Making macro work in all workbooks
How do I record a macro so that it will run when any workbook is opened I'm thinking it has to be saved in a file named personal.xls and save in F:\Program Files\Microsoft Office\OFFICE11\XLSTART. At the presen time, I have nothing in that folder; I thought it was supposed t always have a file named personal.xls. Can someone advise me on this -- Message posted from http://www.ExcelForum.com Do you really mean you want to have a macro run when you open any workbook? Or are you asking how to have macros available when any workbook is open--and you can run them on demand? If the firs...

x-axis auto-fit the contents
graphical format on the x-axis is the alignment buttons, pressing the button than content to select the option to auto-fit, but not select (The button no active) so the x-axis on the writings mixed. ...

Will MS CRM v1.2 support .Net Framework 1.1?
Does anyone know if the international version of MS CRM v1.2 will support the .Net Framework 1.1? No information but logically there would be no reason why they would not support 1.1 and also to support server 2003 they need to be supporting 1.1 "Karl Iuel" <karli@ispartners.co.za> wrote in message news:uZym7rYZDHA.2476@tk2msftngp13.phx.gbl... > Does anyone know if the international version of MS CRM v1.2 will support > the .Net Framework 1.1? > > Yes v1.2 will support .NET 1.1 John is exactly correct with his logic. -- Regards, Ryan Microsoft CRM Suppor...

Money05 Deluxe Hangs when working with Catagories
When I try to move a Category or Delete a Category that has transactions in it Money locks up and I just get a hourglass that will sit there forever and the rest of my OS gets real quirky and slow. I have to Ctrl Alt Delete to shut down Money. When I reopen the transactions that I was attempting to move have moved to the new Category and all seems well(I guess). I'm more then a little nervous that I'm going to end up damaging my file. I gotta say I'm a little disgusted at this point, just got through spending a day working out a lot of the online quirks and now this. Don How lon...

Can't print envelopes in Word X or Word 2004
Working on document recently, changed page setup to be 14 x 8-1/2. Word changed normal.dot without prompting me at SAVE (which is my default), after that all documents were 14 x 8-1/2, changing it didn't help. Finally deleted normal.dot, Word then created a new one with 8-1/2 x 11 page setup, the default. However, ever since I changed page setup to 14x8-1/2, I have been unable to print envelopes -- using Envelope Wizard, I insert text, click PRINT, the envelope displays properly on screen -- but print preview shows a blank envelope. And a blank envelope is printed. I upgraded to Office...

TEMP environment variable
Hi, Does somebody know what happens when I write in the 'TEMP' environment variable more than one directory, seperated by a ';' (For example 'C:\windows\temp ; d:\temp')? Does the OSs (98, 2000, XP) know to use BOTH directories as a temporary directories? Regards, Ram ...

OS X Mail to Entourage import received date wrong
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Email Client: pop Hi All <br><br>When I import from mbox files, Entourage sets the date for all files to today's date. <br><br>I can see from older posts the suggested workaround to use the 'sort by sent' option but is there any fix for this? <br><br>I've tried downloading a couple of scripts suggested but these don't appear to work on my platform. <br><br>Any suggestions? Are there any versions of Entourage which don't behave like this? <br&...

Right mouse button stopped working
Using XPpro. I just had a tech person reformat my hard drive and reinstall XPpro and Office 2007 (from the looks of 2007 I'm sorry I did it). I'm just now getting everything set back up and my right mouse button isn't working. Can anyone help? EXAMPLES: The right mouse button seems dead and is non-responsive when I try to right-click on the desktop. It's also non-responsive when trying to right-click on files to perform copy/paste, etc., functions. Can anyone help? Thanks, Buy a new mouse? JR wrote: > Using XPpro. > > I just had a tech pe...

share a workbook and limit some users
I have a excel spread sheet I use to track property I have purchased an sold. Due to how fast I buy and sell I need people in my office t have access to enter data on this spread sheet. I want my employees t be able to access this spread sheet but not be able to see all of th columns. I want them only to be able to enter and see the purchas information (Columns A thru J) but not be able to see or edit the sale information (Columns K thru N). What I would like is to have one sheet that more than one user coul use, but only let myself be able to see sales information (Cloumns thru N). It...

Trouble adding user or group
Ok, on two of my Home Lan nodes (one is a desktop and other a laptop) Both running WinXP pro sp3. I have the following done on BOTH: 1. Created logon passwords for each (desktop & laptop) owner user account. 2. Set simple file sharing OFF, i.e open Explore->Tools->Folder->View and scrolled down to Use Simple File Sharing and UNCHECKED this. 3. Made sure these two were installed Client for MS Networks File & Print Sharing for MS Networks Did this by going to NetworkPlaces->ViewNetworkConnections->MyNetworkConnection and right clicked...

Clear All filters
I'm using the Access 2007 (SP2) Advanced Filter in a form with multiple sub forms. Here's what I basically enter in the Advanced Filter criteria for the column named ID: IN (SELECT FK_ID FROM tblName Where TestResult Like [Prompt User]) The user enters something like *pass* to get records that have the word "pass" in them (e.g. user may have entered "passed" or other data) Now, clicking toggle filter works fine - the Form is properly filtered. Clicking toggle filter again is fine - it properly un-filters the form. Now, I've further clicked Cle...

Not working {={sum(if(A1:B3=C1:D3,1,0))} sometimes
I have values 11,12,13,14,15,16 in A1:B3 and in C1:D3 I have 1,2,14,3,4,5. That is, instead of matching 14 in A2 with C2, I put it in D2. Now if I use the above formula, I get a zero, also when I check for <> I get 6.. However, If I put it back to C2 I get 1 & <>=5. Why this irregularity? =SUM(COUNTIF(A1:B3,TRANSPOSE(C1:D3))) entered with ctrl + shift & enter -- Regards, Peo Sjoblom "dindigul" <padhye.m@gmail.com> wrote in message news:urgkn8mlHHA.4960@TK2MSFTNGP02.phx.gbl... >I have values 11,12,13,14,15,16 in A1:B3 and in C1:D3 I have 1...

New users don't get an e-mailaddress
Hi! I have a problem with addresses not being generated upon creating users anymore. We have a default recipient policy to create an SMTP address and an x.400 address on every new user or group. Now recently I created a user and a group and they don't get any address automatically. I have forced a rebuild of RUS but no addresses appear on either user or group. I tried to manually addan SMTP address to the user and after waiting 24 hours allowing the AD to sync several times, the user still didn't show in the Global Address List, and consequently I can't get to the users inb...

localization of CRM 3.0 user interface
Can a single installation of CRM 3.0 simulatenously support users in multiple languages? I know CRM 3.0 is available in a variety of languages, but in my scenario its a global company wanting to deploy a single instance of CRM 3.0 whereby the UI would be dynamically translated for CRM users in different countries. Not yet. It's been mentioned at various Microsoft events that version 4 will have multi-language support. Currently Q2 2007 release date I think Dave Ireland "dMo" <dMo@discussions.microsoft.com> wrote in message news:802D6F65-804D-4882-8003-CF94994153...

Attachments between Exchange users not working
OK, so we had some issues last week with our Exchange 2003 Enterprise Edition server not communicating with one of our Active Directory controllers. After some extended quality time with Microsoft engineers, that's ironed out, with one exception: my users can't send attachments to other users. We can send and receive attachements to off-server recipients with no problem (i.e. Internet email accounts), but if I try to send an attachment to another recipient on the server it doesn't work. Specifically, if I send a Word document that's 14KB, the recipient gets the email co...

printing 8.5 x 11 pages on 11 x 17 paper
I am trying to print a newsletter laid out 8.5 x 11 on 11 x 17" paper, so that I can get two pages to a side of paper and print on both sides. My Savin 2055DP has a booklet option, but it automatically shrinks the 8.5 x 11 image, even though it prints correctly in all other aspects. How difficult is it to layout 2 pages on 11 x 17 format in Publisher? Any tricks for pagination, etc.? What is a good reference for layout for me to look at? Jeff Wittenbrink After managing to set up OE-QuoteFix on his new PC, Ed reads a message from Jeff Wittenbrink <jwbrink@aol.com>... &...

The node should show only for users in the AdminCalendar role
Below is part on my web.sitmap file. What I wanted to happen is for the last node to show only for users in the AdminCalendar role. But it shows always. How can I fix that? <siteMapNode title="Home" url="Home/Home.aspx" description="Go to the The Home Page" > ....snip <siteMapNode title="Calendar" roles="*" description="Time an Location of events" > <siteMapNode title="Monthly Calendars" url="Calendar/EventsCalendar.aspx" description="Calendar of events&...

[4] 8 1/2 x 11 pages on [1] 11x17
I would like to (4) 8 1/2 x 11 pages on both sides of 11x17 stock with a fold down the middle. I can do it but the page come out in the wrong order. Have tried all the possible combinations of file/page suetup/layout/folded card. Duplex printing is selected it would need to print like this: ============== page 4 (upside down) -----------------fold---- page 1 ============== ============== page 3 (upside down) -----------------fold--- page 2 (upside down) ============== Can you tell me what the settings would be? File Page setup Special fold Landscape OK Yes to the next screen (it gi...