Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Finding the desktop folder of the current User in Access 2007 VBA

Posted on 2010-11-23
3
Medium Priority
?
477 Views
Last Modified: 2012-05-10
Like it says in the title, I need to find a file on the desktop of the User that has my app open. I have code to look for file in a folder already - but where do I make it look at that desktop folder for the current User? Is there an easy way?

many thanks.
0
Comment
Question by:Peborgh
3 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1600 total points
ID: 34195968
Environ("USERPROFILE") & "\Desktop" will get you there.
0
 
LVL 49

Assisted Solution

by:Dale Fye
Dale Fye earned 400 total points
ID: 34196338
Or you can try the API call available via the code located at: http://www.mvps.org/access/api/api0054.htm

This API call gives you a variety of parameters for locating various folders on the users computer.
0
 

Author Comment

by:Peborgh
ID: 34196833
LSM...: it works! (why am I not surprised...)

Fyed: very comprehensive and will remain in my list of "useful things to know about" but for the moment, I will use LSM...'s simpler solution.

peter
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

971 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