Solved

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

Posted on 2010-11-23
3
456 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 84

Accepted Solution

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

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 100 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

752 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