Some months ago, we requested help from this newsgroup on how to replace
the library reference of a database with another library reference,
prior to creating an MDE. I got the following answer from Stephen K.
Young, which does the job:
[color=blue]
>In message <ahjurk$t18vo$1 @ID-65843.news.dfnc is.de>, Stephen K. Young
><s@k.y.invalid > writes
>Using automation you can temporarily replace a developer library reference
>with a compiled library reference. Sample code below. Then continue with
>automation to compile the .Mde as before. Afterwards you probably want to
>use automation again to reverse the front-end references back to your
>un-compiled developer library.
>
>- Steve
>
>
> For lngRef = appAccess.Refer ences.Count To 1 Step -1 ' loop backwards,
>one-based
> Set ref = appAccess.Refer ences(lngRef)
> If ref.Name = strRefName Then
> appAccess.Refer ences.Remove ref
> Endif
> Next lngRef
>[/color]
<Snip>
I added a:
AppAccess.OpenC urrentDatabase (DbFileName)
at the start to open the database with which to work.
This works fine, apart from one minor problem - when the database is
opened, the AutoExec or Startup form starts running unless I keep my
finger on the shift key.
Is there another way of opening the database, or of preventing the code
from running?
Thanks
--
Zippy
the library reference of a database with another library reference,
prior to creating an MDE. I got the following answer from Stephen K.
Young, which does the job:
[color=blue]
>In message <ahjurk$t18vo$1 @ID-65843.news.dfnc is.de>, Stephen K. Young
><s@k.y.invalid > writes
>Using automation you can temporarily replace a developer library reference
>with a compiled library reference. Sample code below. Then continue with
>automation to compile the .Mde as before. Afterwards you probably want to
>use automation again to reverse the front-end references back to your
>un-compiled developer library.
>
>- Steve
>
>
> For lngRef = appAccess.Refer ences.Count To 1 Step -1 ' loop backwards,
>one-based
> Set ref = appAccess.Refer ences(lngRef)
> If ref.Name = strRefName Then
> appAccess.Refer ences.Remove ref
> Endif
> Next lngRef
>[/color]
<Snip>
I added a:
AppAccess.OpenC urrentDatabase (DbFileName)
at the start to open the database with which to work.
This works fine, apart from one minor problem - when the database is
opened, the AutoExec or Startup form starts running unless I keep my
finger on the shift key.
Is there another way of opening the database, or of preventing the code
from running?
Thanks
--
Zippy