You must have the reference to msaccess.exe: the switches are switches for
the executable, and therefore the executable must be in the command line to
receive the switches.
You could try converting the paths to their short file name equivalents. For
instance, "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE" would
probably be C:\Progra~1\Micros~1\Office10\MSACCESS.EXE
http://www.mvps.org/access/api/api0020.htm at "The Access Web" is code that
will help you determine the correct short file names.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
> "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
> "\\insseafs0a\insall\Business Process Management\Impact Analysis\Impact
[quoted text clipped - 8 lines]
>
> In general, how does one go about handling the limitations here.
Yes, you can change the registration for .mdb files so
that Windows expects parameters 2, 3, 4, etc.
The system is not very flexible, and normally if you
specify extra parameters, windows will give you an error
message if they are not provided - so double clicking
on an mdb after changing the registration would always
give you an error message, which you can ignore.
Another solution is to change the extension on the
access file, so that you can create a new registration,
with more command line parameters as required.
And that still only helps you with the Access path -
the other paths are still long.
A better solution is to define an access profile,
so that the workgroup path does not have to be
included at all:
...msaccess.exe /profile myprofile /user "usr" ...
Like file associations, profiles definitions go
in the registry: look in the Access help for information
on using profiles.
And somewhere, there is a setting which adjusts
the maximum allowable length for command lines.
But traditionally, the normal solution to this problem
is to NOT USE LONG NETWORK PATHS. The path to Access
would not matter if you were using simple 8 character
folder names for your network folders.
You can (unless the feature is disabled) use the
short names for your long folder names, for example
progra~1 instead of "program files", (you can get
the short names by doing a directory listing from
the command prompt) but how much easier just to use
short hames for your network folders in the first
place!
(david)
> "C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE"
> "\\insseafs0a\insall\Business Process Management\Impact Analysis\Impact
[quoted text clipped - 8 lines]
>
> In general, how does one go about handling the limitations here.
Access101 - 28 Feb 2006 23:16 GMT
Thanks to both of you, that was very helpful!
> Yes, you can change the registration for .mdb files so
> that Windows expects parameters 2, 3, 4, etc.
[quoted text clipped - 52 lines]
> >
> > In general, how does one go about handling the limitations here.