[AccessD] Syntax for setting button with event procedure

Kath Pelletti kp at sdsonline.net
Wed Feb 13 17:45:25 CST 2008


Hi Darryl - another Aussie? (Which state?)

Thx for suggestion - my problem was getting the syntax right where the form 
name is a variable as opposed to a known form name....still haven't nutted 
that out. Annoying when you know you've done it before and forgotten 
something so basic.....

Kath
----- Original Message ----- 
From: "Darryl Collins" <Darryl.Collins at coles.com.au>
To: "Access Developers discussion and problem solving" 
<accessd at databaseadvisors.com>
Sent: Thursday, February 14, 2008 10:18 AM
Subject: Re: [AccessD] Syntax for setting button with event procedure


> Kath,
>
> Try:
> In a regular form
> [Forms]![frm_FYP_APLID].Closebutton.OnClick = "[Event Procedure]"
>
> In a sub form
> [Forms]![frm_FYP_APLID].[frm_miniTL5].[Form].Closebutton.OnClick = "[Event 
> Procedure]"
>
> I think that should work...
>
> cheers
> Darryl.
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Kath Pelletti
> Sent: Thursday, 14 February 2008 9:56 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Syntax for setting button with event procedure
>
>
> 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
>>
>>
>
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> This email and any attachments may contain privileged and confidential 
> information and are intended for the named addressee only. If you have 
> received this e-mail in error, please notify the sender and delete this 
> e-mail immediately. Any confidentiality, privilege or copyright is not 
> waived or lost because this e-mail has been sent to you in error. It is 
> your responsibility to check this e-mail and any attachments for viruses. 
> No warranty is made that this material is free from computer virus or any 
> other defect or error.  Any loss/damage incurred by using this material is 
> not the sender's responsibility.  The sender's entire liability will be 
> limited to resupplying the material.
>
> -- 
> 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