Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Environ() 1

Status
Not open for further replies.

elizabeth

IS-IT--Management
Sep 16, 1999
1,196
US
I recently received an email asking for further info on this topic which I posted on the Access forum FAQ page. Here is all I know about this function, mostly gathered from previous posts.<br><br>There is a useful NT function that can retrieve a number of OS variables. The one people have most commonly asked about in the Access forum is <b>Environ(&quot;username&quot;)</b>&nbsp;&nbsp;(<i>thanks Jonathon</i>) which shows the NT userid of the curent user in an Access Database. To learn more about this, go to the command window/DOS prompt and type SET to see the list of variables captured (<i>thanks ag</i>). There are tewnty-something variables and they can be referenced by name or number. For example, Environ(23) = Environ(&quot;user&quot;), although they display slightly differently. Although I've noticed the name reference works as a default in the table design window like this: <b>=environ(&quot;username&quot;)</b>(<i>thanks Jim</i>) but <b>=environ(23)</b> doesn't work in that location for me. Another way you can look at these is to go to the Access debug window and key:<br><b>? Environ(23)</b> or<br><b>? Environ(&quot;username&quot;)</b> etc.
 
There are custom functions related to this also posted in this froum. Use the Search tab, keyword:<br><b>Environ(*</b><br>May take a minute to find 'em all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top