Just to clarify some things about opening a secure database from within an
unsecure database...my air code posted earlier would never work in Access
(although it works in VB just fine). The following code WILL work...
Dim dbe as New PrivDbEngine 'NOTE this object is not documented in
Access, but is documented elsewhere
Dim wrk as Workspace
Dim db as database
dbe.SystemDB = "path to workgroup file here" 'you'll either have to hard
code it or prompt from the user.
Set wrk = dbe.CreateWorkspace("SecureWorkspace","user name here", "password
here")
dbe.Workspaces.Append wrk
Set db = wrk.OpenDatabase(currentdb.name)
'ok....relink tables or do whatever now
If anyone is interested in documentation for PrivDBEngine see
http://www.microsoft.com/resources/d...t/jetch02.mspx
(it IS there...just way down the page!)
--
Paul Overway
Logico Solutions
http://www.logico-solutions.com
"Paul Overway" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> PS....just to clarify...you need to relink using the db object from below,
> don't use currentdb or another db object because currentdb was opened in
> the "unsecure" workspace
>
> --
> Paul Overway
> Logico Solutions
> http://www.logico-solutions.com
>
>
> "Paul Overway" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> I'm sorry...it has been awhile since I did something like that. You DO
>> need to work in a 2nd workspace, but you also need to instantiate another
>> DBEngine object first. So, you'd do something like this (air code)
>>
>> Dim dbe as New DbEngine
>> Dim wrk as Workspace
>> Dim db as database
>>
>> dbe.SystemDB = "path to workgroup file here" 'you'll either have to
>> hard code it or prompt from the user.
>> Set wrk = dbe.CreateWorkspace("SecureWorkspace","user name here",
>> "password here")
>> dbe.Workspaces.Append wrk
>>
>> Set db = wrk.OpenDatabase(currentdb.name)
>>
>> 'ok....relink tables or do whatever now
>>
>>
>> --
>> Paul Overway
>> Logico Solutions
>> http://www.logico-solutions.com
>>
>>
>> "Jenny" <(E-Mail Removed)> wrote in message
>> news:75212A1E-84F0-4970-B23F-(E-Mail Removed)...
>>> Thanks Paul Overway, your solution did and didn't help me - believe me,
>>> after
>>> hours of reading and experimenting I would have created a new workspace
>>> with
>>> a specific workgroup if I could fine the correct syntax or a relevant
>>> example somewhere! Can you give me a sample please of linking to tables
>>> in a
>>> backend database that has a specific workgroup from within a frontend
>>> database that does not have it's own specific workgroup. Or if anyone
>>> else
>>> can, I would really appreciate it! Thanks - Jenny
>>>
>>
>>
>
>