Solved

Environmental Variable "tmp" Path / Access VBA

Posted on 2010-09-07
2
551 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 119

Accepted Solution

by:
Rey Obrero 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now