Access Path too long for Target Shortcut (1 Viewer)

dmeid

Registered User.
Local time
Today, 16:30
Joined
Aug 7, 2002
Messages
29
I am trying to apply security to a FE and a BE Datase, by using a short cut that looks somewhat like this.

"C:\Program Files\Microsoft Office\Office\msaccess.exe" /wrkgrp "X:\YourWorkgroupFile.mdw" "X:\YourFrontendDB.mdb"
"C:\Program Files\Microsoft Office\Office\msaccess.exe" /wrkgrp "X:\YourWorkgroupFile.mdw" "X:\YourBackendDB.mdb"

My problem is that the path to apply a workgroup to both FE and BE is too long for the Target field in the Shortcut. It only allows a certain number of characters.

How can I get my full paths applied to this Target: field of the shortcut

All Help is greatly appreciated !!!
 

ReAn

Dangerous Programmer...
Local time
Today, 09:30
Joined
Jun 25, 2004
Messages
250
Make a batch file (*.bat) with this exact contents:
Code:
@echo off
C:\Program Files\Microsoft Office\Office\msaccess.exe /wrkgrp "X:\YourWorkgroupFile.mdw" "X:\YourFrontendDB.mdb" 
C:\Program Files\Microsoft Office\Office\msaccess.exe /wrkgrp "X:\YourWorkgroupFile.mdw" "X:\YourBackendDB.mdb"

Make Shortcut to the Batch File
 

dmeid

Registered User.
Local time
Today, 16:30
Joined
Aug 7, 2002
Messages
29
Thank you soo, much it worked wonderfully!
 

rutica

Registered User.
Local time
Today, 11:30
Joined
Jan 24, 2008
Messages
87
I know this is an old post, but...

I am trying to do the same thing. Using my batch file works fine, but the DOS window stays open until Access closes.

Here is my .bat file:
@echo off
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "\\nct3\Common\ManagementCenters\ProjectHealth\PADA\Test Databases\securityTest.mdb" /WRKGRP "\\nct3\Common\ManagementCenters\ProjectHealth\PADA\Test Databases\Security.mdw"

I have tried typing EXIT or CLS at the end of the batch file above, but no luck.

How can I get the DOS window to go away after Access opens?

Thanks,
 
Last edited:

SOS

Registered Lunatic
Local time
Today, 08:30
Joined
Aug 27, 2008
Messages
3,517
Try renaming your .bat file to .cmd instead.
 

rutica

Registered User.
Local time
Today, 11:30
Joined
Jan 24, 2008
Messages
87
thanks for writing. I renamed the file from:

shortcut Test.bat

to:

Copy of shortcut Test.cmd

but it doesn't fix the problem. The Command window still stays open.

I have Windows XP and Office 2003.

Thanks,
 

rutica

Registered User.
Local time
Today, 11:30
Joined
Jan 24, 2008
Messages
87
Thanks for writing.

It didn't work. Now the DOS windows opens for a second, then closes and Access doesn't open at all.
 

SOS

Registered Lunatic
Local time
Today, 08:30
Joined
Aug 27, 2008
Messages
3,517

rutica

Registered User.
Local time
Today, 11:30
Joined
Jan 24, 2008
Messages
87
Yes, it works with the Start " "

Thanks, for your help though!
 

SOS

Registered Lunatic
Local time
Today, 08:30
Joined
Aug 27, 2008
Messages
3,517
Yes, it works with the Start " "

Thanks, for your help though!
Good, I used the Start /I in some code I had a long time ago and I had found it so at least you figured out how to use it to make it work for you. Glad you were able to get on the path and play with it and get it to work.
 

Simon_MT

Registered User.
Local time
Today, 16:30
Joined
Feb 26, 2007
Messages
2,177
I have understood that the path of the database should be short and whilst I had some control over the server configuration mapping of Network drives the BE was S:\Data.mdb. The Fe was C:\Databases\Network.mde. I realise that Access has moved on but old habits (Access 1997) have proved unproblematical.

Simon
 

Gerald_Brickson

New member
Local time
Today, 20:30
Joined
May 18, 2020
Messages
1
Exactly, I came to face this issue also. Then someone recommended me Long Path Tool software and I am grateful to that person
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 10:30
Joined
Feb 28, 2001
Messages
27,175
Not that you would necessarily need it because you already have a solution, but if you really wanted to shorten your typing for a long path, there would have been the possibility of using the SUBST command issued at the command prompt.

Code:
SUBST drive1:   drive2:/part/of/long/path/string

And you could delete the new virtual drive with

Code:
SUBST drive1: /D
 

Users who are viewing this thread

Top Bottom