[AccessD] Set references via automation

jwcolby jwcolby at colbyconsulting.com
Mon Jan 2 11:13:58 CST 2012


Gustav,

I was mistaken, it doesn't actually say opening a form will absolutely unequivocally trigger an 
error.  It does say don't do it.

http://www.trigeminal.com/usenet/usenet026.asp

Do not load any forms, even hidden ones, especially not ones with custom controls on them -- you 
will find control sites not hooked up which causes all kinds of problems. This is stuff for later, 
after you have fixed up references. The error this can cause will be familiar to many: "You entered 
an expression that has an invalid reference to the property __________" (fill in the blank with 
on-click or some other property).

John W. Colby
Colby Consulting

Reality is what refuses to go away
when you do not believe in it

On 1/2/2012 11:52 AM, Gustav Brock wrote:
> Hi Charlotte
>
> Are you sure? I'm quite sure I once tried that with a simple splash-type form. There will be nothing to stop it from being displayed as long as no code dependant on a missing reference is run.
> In any case you should be able to open a form with no code-behind but with a visible textbox or checkbox with the controlsource set to something like:
>
> =CompileAndSave(VerifyReferences())
>
> where VerifyReferences returns a boolean which, if False, would cancel the compile-and-save and instead pop a messagebox with an error.
>
> /gustav
>
>
>>>> charlotte.foust at gmail.com 02-01-2012 17:24>>>
> Nope, not from the opening form.  That loads libraries and you have to
> clean the references first.
>
> Charlotte Foust
>
> On Mon, Jan 2, 2012 at 5:15 AM, Gustav Brock<Gustav at cactus.dk>  wrote:
>
>> Hi John
>>
>> I thought you planned to make some kind of clean install where references
>> were not set - including the files for the libraries to be used - then add
>> these libraries as references.
>> Of course, if they are already there, you would need to delete them first
>> - should be no big deal. But if you use a fixed path for the libraries, I
>> don't see why it should be necessary to remove and re-add these.
>>
>> I don't know about macros run via automation or from the office tools for
>> Visual Studio. By second thought, using the AutoExec macro was just
>> convenient, it could be run from the opening form as well as long as it
>> doesn't contain action code dependant on the new references. If so, you
>> should be able to call the functions directly via the office tool, thus
>> skipping the macro stuff - but again, I'm shooting in the wild, have never
>> used it.
>>
>> /gustav
>
>



More information about the AccessD mailing list