469,655 Members | 1,852 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,655 developers. It's quick & easy.

How to receive the current folder location as string

Dear Access friends,

How can I load a string with his own folder address.

The following code addressed to the system folder of MS programs.

Application.SysCmd(acSysCmdAccessDir)

But now I need a string with the current location, the same location in
which I have started the application.

Thanks for any help,

Simon
Oct 21 '06 #1
1 3369
To obtain the path in which the current Access database resides (which may
not be the current folder): CurrentDB.Name.

The current folder (aka directory) is returned by CurDir. Here's the Access
2002 Help on CurDir:

CurDir Function
Returns a Variant (String) representing the current path.

Syntax

CurDir[(drive)]

The optional drive argument is a string expression that specifies an
existing drive. If no drive is specified or if drive is a zero-length string
(""), CurDir returns the path for the current drive. On the Macintosh,
CurDir ignores any drive specified and simply returns the path for the
current drive.

Larry Linson

Microsoft Access MVP

"Simon" <Sv********@Versatel.nlwrote in message
news:45***********************@news.tele2.nl...
Dear Access friends,

How can I load a string with his own folder address.

The following code addressed to the system folder of MS programs.

Application.SysCmd(acSysCmdAccessDir)

But now I need a string with the current location, the same location in
which I have started the application.

Thanks for any help,

Simon


Oct 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by MattG | last post: by
3 posts views Thread by News | last post: by
1 post views Thread by Sajjad Akhter | last post: by
9 posts views Thread by Nick 'The Database Guy' | last post: by
9 posts views Thread by Keith G Hicks | last post: by
8 posts views Thread by Mateusz Viste | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.