[AccessD] Saving onClick event procedure

Gustav Brock gustav at cactus.dk
Thu May 13 06:06:49 CDT 2004


Hi Ryan

So you are also designing and creating the controls from code?
That you didn't tell ...

Meanwhile, I located the Smart Access article. It is

  Fixing Broken Event Procedure Properties
  By Ken Getz
  Smart Access July 1996 p. 20.

The add-ins were for Access 2.0 and 95 and were named

  FIXEVT16.MDA and FIXEVT32.MDA

respectively and packed in the file "_GETZ32.EXE" on the companion
diskette used at those days - I just found it in a dusty box.

I used the Access 2.0 version which worked well - but both versions
were meant to fix missing procedures for existing controls.
I guess the A95 version can be used or at least easily modified for
newer Access versions.

/gustav


> Thanks to those who responded I managed to get this to work...

> Essentially, what needs to happen is the control needs to have the event
> hooked up when it is first programatically designed...
> i.e

>   Set loBtn = CreateControl(strFormName, acCommandButton, acDetail)
>   With loBtn
>     .name = "cmdPrint"
>     .Caption = "Print"
>      .OnClick = "[Event Procedure]"
>   End With

> Then 'CreateEventProc' will work.

> Cheers
> Ryan




More information about the AccessD mailing list