[AccessD] Syntax for setting button with event procedure

Kath Pelletti kp at sdsonline.net
Wed Feb 13 16:55:33 CST 2008


Thanks everybody for the advice - nearly there now.....
This did the trick....MyPictureButton.OnClick = "[Event Procedure]"

But I can't remember how to incorporate a variable form name into this line:
If I use the real form name this works:

 Forms!frmrefcountries![Closebutton].OnClick = "[Event Procedure]"

But my form name is strformname which gets passed into the routine.

Two versions which don't work are:

    Forms!strformname![Closebutton].OnClick = "[Event Procedure]"
    Forms![<strformname>]![Closebutton].OnClick = "[Event Procedure]"

Kath



----- Original Message ----- 
From: "Asger Blond" <ab-mi at post3.tele.dk>
To: "'Access Developers discussion and problem solving'" 
<accessd at databaseadvisors.com>
Sent: Wednesday, February 13, 2008 9:19 PM
Subject: Re: [AccessD] Locking form control - Image control


> To temporarily disable the Click-procedure use:
> MyPictureButton.OnClick = ""
> To reenable the Click-procedure use:
> MyPictureButton.OnClick = "[Event Procedure]"
>
> HTH
> Asger
>
> -----Oprindelig meddelelse-----
> Fra: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] På vegne af Kath Pelletti
> Sendt: 13. februar 2008 05:09
> Til: Access D Normal List
> Emne: [AccessD] Locking form control - Image control
>
> Different problem.....
>
> One of the controls on my form is the 'Add' button which the user clicks 
> to
> add a new record (Image control because I have an icon image for add
> buttons).
>
> The control type is acimage which does not have an enabled or locked
> property.
>
> Is there a way I can temporarily remove it's 'On Click' property so the 
> user
> cannot click and add a new record?
>
> tia
> Kath
> ______________________________________
> Kath Pelletti
> Software Design and Solutions Pty Ltd
> Ph: 9505-6714
> Fax: 9505-6430
> kp at sdsonline.net
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> 





More information about the AccessD mailing list