Solved

Environmental Variable "tmp" Path / Access VBA

Posted on 2010-09-07
2
569 Views
Last Modified: 2012-05-10
I have a piece of code that saves a file to the directory named in the environmetal variable path for tmp (i.e. in this case C:\...\...\...\My Documents).

As the exact string may change from user to user, i want to seach for the file based on the pathname stored in the environmental variable tmp and filename.

Is there a standard command to call this string value in access VB?

0
Comment
Question by:SweetingA
2 Comments
 
LVL 75
ID: 33619878
You mean

Environ("PATH")

?

mx
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 33620142
use this

Environ("userprofile") & "\My Documents"

will give you

C:\Documents and Settings\<user Name>\My Documents
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question