Remember, anytime you launch ms-access, you MUST be attached to a workgroup
file. So, if you launch your application, you should already be attached to
the correct workgroup file. At this point, your regular re-linking code
should work just fine. I do believe that a user needs read + write
permissions on the tables to re-link (at least that is what is happening for
one of my applications).
If there is security on those linked files, then you have to be attached to
the workgroup BEFORE you start the linking process.
While you can in code open a another database, and specify the workgroup
file, to link to that file..you going to have to have permissions in the
file you are running to build those links. Knowing the workgroup file is not
enough in this case, since the linking objects are in your local database,
but will need permissions set from workgroup file. so, you have to start-up
your mdb using a shortcut to specify the workgroup file. Then, you should
have no problems to re-link.
are you trying to re-link in code, or simply use the linked table manager?
(try using the linked table manager...maybe you can link).
Further, does your mde (or mdb) file already have table links, or do you
need to create those also?
I would test/try the linked table manager...once you can link that way, then
you can use code here:
http://www.mvps.org/access/tables/tbl0009.htm
Either way..(code, or link table manager), you have to be joined to the
workgroup first. You can use the workgroup admin tools to join that
workgroup...or simply specify the workgroup in a shortcut you use to launch
the mdb file.
eg:
"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE"
"C:\Documents and Settings\All Users\Application Data\Rides\RidesXP.mde"
/runtime
/Wrkgrp "\\nite-server\files\RIDES SOFTWARE\Rides.mdw"
The above shortcut would be on one line...but, it does specify the workgroup
file for you..and thus eliminates that need to
join the workgroup file. Use of a shortcut will depend on a case by case
bases.