Solved

Environmental Variable "tmp" Path / Access VBA

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

790 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