Determine Path/Directory of My Frontend

G

Guest

Hi:
I have an application that is split into a front-end and back-end
application. The backend will be installed on the LAN on a drive that
everyone can see; but the front-end app will be running on several different
desktops. What does the code look like to determine the path/directory for
the front end?

I would then want to use that path/directory and have my application export
data to, and open an excell spreadsheet where my desktop front-end is running.
 
D

Duane Hookom

Try:
Left(currentdb.Name, Len(Currentdb.Name)-Len(Dir(Currentdb.Name)))
This will return something like:
C:\Documents and Settings\hookomd\My Documents\Access\

Duane Hookom
MS Access MVP
 
D

Dirk Goldgar

Duane Hookom said:
Try:
Left(currentdb.Name, Len(Currentdb.Name)-Len(Dir(Currentdb.Name)))
This will return something like:
C:\Documents and Settings\hookomd\My Documents\Access\

Also, in Access 2000 or later you can use CurrentProject.Path to get
just the path, without having to strip out the filename.
 
D

Douglas J. Steele

Dirk Goldgar said:
Also, in Access 2000 or later you can use CurrentProject.Path to get
just the path, without having to strip out the filename.

Subtle difference, though. Duane's way includes the terminating slash, your
way doesn't. No biggie, but you can't just substitute one method for the
other.
 
D

Dirk Goldgar

Douglas J. Steele said:
Subtle difference, though. Duane's way includes the terminating
slash, your way doesn't. No biggie, but you can't just substitute one
method for the other.

Quite so.
 
G

Guest

Is there no vb constant that can be used for the value of the current user's
My Documents folder?
 
G

Guest

Thanks Doug this helps out a ton - and there's a lot more useful constants
there that I can use too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top