By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,827 Members | 2,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,827 IT Pros & Developers. It's quick & easy.

local path variable...

P: n/a
Hello,

I'm trying to make a shortcut that will open an mdb in the same folder
as the shortcut - regardless of where the file/shortcut may be. In other
words, I wan to be able to copy and paste the two files anywhere and have
the shortcut always open the mdb that was copied with it without having to
change the shortcut properties. I thought there was an environment variable
like %currentpath% that works like %username% which works in a shortcut.
Something like

"C:\Program Files\Microsoft Office\Office11\msaccess.exe"
%currentpath%MyDB.mdb /user %username%

I can't get the %currentpath% part to work.

Does anyone know how to do this?

Thanks.
--
Matthew.Wells
Ma***********@FirstByte.net
Jul 31 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Jul 31, 11:44*am, "Matthew Wells" <Matthew.We...@FirstByte.net>
wrote:
Hello,

* * I'm trying to make a shortcut that will open an mdb in the same folder
as the shortcut - regardless of where the file/shortcut may be. *In other
words, I wan to be able to copy and paste the two files anywhere and have
the shortcut always open the mdb that was copied with it without having to
change the shortcut properties. *I thought there was an environment variable
like %currentpath% that works like %username% which works in a shortcut.
Something like

"C:\Program Files\Microsoft Office\Office11\msaccess.exe"
%currentpath%MyDB.mdb /user %username%

I can't get the %currentpath% part to work.

Does anyone know how to do this?

Thanks.

--
Matthew.Wells
Matthew.We...@FirstByte.net
You can try %cd% which will return the current path.

Bruce
Jul 31 '08 #2

P: n/a
You could also try .\MyMDB.mdb as the path.

Regards
Anthos
HTH
Aug 1 '08 #3

P: n/a
Thanks, but it didn't work. I think the %% variables are only usable after
a switch like /user %username%

"Bruce" <de***************@gmail.comwrote in message
news:4d**********************************@d1g2000h sg.googlegroups.com...
On Jul 31, 11:44 am, "Matthew Wells" <Matthew.We...@FirstByte.net>
wrote:
Hello,

I'm trying to make a shortcut that will open an mdb in the same folder
as the shortcut - regardless of where the file/shortcut may be. In other
words, I wan to be able to copy and paste the two files anywhere and have
the shortcut always open the mdb that was copied with it without having to
change the shortcut properties. I thought there was an environment
variable
like %currentpath% that works like %username% which works in a shortcut.
Something like

"C:\Program Files\Microsoft Office\Office11\msaccess.exe"
%currentpath%MyDB.mdb /user %username%

I can't get the %currentpath% part to work.

Does anyone know how to do this?

Thanks.

--
Matthew.Wells
Matthew.We...@FirstByte.net
You can try %cd% which will return the current path.

Bruce
Aug 1 '08 #4

P: n/a
Thanks, but it didn't work.
"Anthos" <an*****@itexcellence.com.auwrote in message
news:c5**********************************@r15g2000 prd.googlegroups.com...
You could also try .\MyMDB.mdb as the path.

Regards
Anthos
HTH

Aug 1 '08 #5

P: n/a
What about if you did it as a batch file?
Then you could use the System Variables, and the .\MyDB.mdb as I
mentioned above.

Just a thought.
Aug 3 '08 #6

P: n/a
Not a bad idea. I'll do that if I can't find the answer.

Thanks!!!
"Anthos" <an*****@itexcellence.com.auwrote in message
news:86**********************************@i24g2000 prf.googlegroups.com...
What about if you did it as a batch file?
Then you could use the System Variables, and the .\MyDB.mdb as I
mentioned above.

Just a thought.

Aug 3 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.