RunApp - file path for multiple users?

Rik_StHelens

Registered User.
Local time
Today, 20:07
Joined
Sep 15, 2009
Messages
164
Hi

I use the RunApp Macro to switch between a suite of databases that we use.

When i release an update, I put front end of the DB on everyones machine. Only problem, I have to update the file path to include their users name.

Can I use some code in RunApp to pull in their user name so it works as soon as it is placed on their machine?

I use the following at the minute:

C:\Program Files\Microsoft Office\Office12\MSACCESS "C:\Users\richard.Tyrenet\Documents\Tyrenet Databases\AccountsDataBase.accdb"

Many Thanks in advance
 
dont think thats possible in a macro, but in vba you can.
environ("Username") will return the username

Or currentdb.Name will hold the current folder + name of the current database, usefull if it is in the same spot.
 
dont think thats possible in a macro, but in vba you can.
environ("Username") will return the username

Or currentdb.Name will hold the current folder + name of the current database, usefull if it is in the same spot.


That could be useful.

We have some XP, some Vista and some W7 machines so the path can differ slightly due to directory structure
 

Users who are viewing this thread

Back
Top Bottom