PC Review


Reply
Thread Tools Rate Thread

Assessing toolbar property

 
 
SF
Guest
Posts: n/a
 
      27th Feb 2006
I have a combo that display optional action for a listbox on the same form.
A have a toolbar with two bottum that use to select/deselect the items in
the listbox. In some activity, I want to disable these two buttons on the
toolbar. How can I change d property of each toolbar button?

SF


 
Reply With Quote
 
 
 
 
Arvin Meyer [MVP]
Guest
Posts: n/a
 
      27th Feb 2006
Use the click event or the after update event of the control you want to
trigger the action. In an [Event Procedure] use something like the
following:

Sub MyControl_AfterUpdate()
Me.MyButtonName.Enabled = False
Me.MyOtherButton.Enabled = False
End Sub

Use another event such as the form's current event to set them back to True.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access

"SF" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a combo that display optional action for a listbox on the same

form.
> A have a toolbar with two bottum that use to select/deselect the items in
> the listbox. In some activity, I want to disable these two buttons on the
> toolbar. How can I change d property of each toolbar button?
>
> SF
>
>



 
Reply With Quote
 
Pieter Wijnen
Guest
Posts: n/a
 
      27th Feb 2006
Or in this case

Dim Cbo AS Office.CommandBar 'needs to be added to references ie microsoft
office library

Set Cbo=Access.Commandbars("MyBar")
Cbo("Button1").Enabled=False

Pieter

"Arvin Meyer [MVP]" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Use the click event or the after update event of the control you want to
> trigger the action. In an [Event Procedure] use something like the
> following:
>
> Sub MyControl_AfterUpdate()
> Me.MyButtonName.Enabled = False
> Me.MyOtherButton.Enabled = False
> End Sub
>
> Use another event such as the form's current event to set them back to
> True.
> --
> Arvin Meyer, MCP, MVP
> Microsoft Access
> Free Access downloads
> http://www.datastrat.com
> http://www.mvps.org/access
>
> "SF" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> I have a combo that display optional action for a listbox on the same

> form.
>> A have a toolbar with two bottum that use to select/deselect the items in
>> the listbox. In some activity, I want to disable these two buttons on the
>> toolbar. How can I change d property of each toolbar button?
>>
>> SF
>>
>>

>
>



 
Reply With Quote
 
david epsom dot com dot au
Guest
Posts: n/a
 
      28th Feb 2006
Or,

Dim Cbo AS object 'doesn't need reference to microsoft office library

Set Cbo=Access.Commandbars("MyBar")
Cbo("Button1").Enabled=False


(david)

"Pieter Wijnen" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Or in this case
>
> Dim Cbo AS Office.CommandBar 'needs to be added to references ie microsoft
> office library
>
> Set Cbo=Access.Commandbars("MyBar")
> Cbo("Button1").Enabled=False
>
> Pieter
>
> "Arvin Meyer [MVP]" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Use the click event or the after update event of the control you want to
>> trigger the action. In an [Event Procedure] use something like the
>> following:
>>
>> Sub MyControl_AfterUpdate()
>> Me.MyButtonName.Enabled = False
>> Me.MyOtherButton.Enabled = False
>> End Sub
>>
>> Use another event such as the form's current event to set them back to
>> True.
>> --
>> Arvin Meyer, MCP, MVP
>> Microsoft Access
>> Free Access downloads
>> http://www.datastrat.com
>> http://www.mvps.org/access
>>
>> "SF" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> I have a combo that display optional action for a listbox on the same

>> form.
>>> A have a toolbar with two bottum that use to select/deselect the items
>>> in
>>> the listbox. In some activity, I want to disable these two buttons on
>>> the
>>> toolbar. How can I change d property of each toolbar button?
>>>
>>> SF
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
SF
Guest
Posts: n/a
 
      28th Feb 2006
Thank for all your useful tips.

SF

"david epsom dot com dot au" <david@epsomdotcomdotau> wrote in message
news:O7Aqx4$(E-Mail Removed)...
> Or,
>
> Dim Cbo AS object 'doesn't need reference to microsoft office library
>
> Set Cbo=Access.Commandbars("MyBar")
> Cbo("Button1").Enabled=False
>
>
> (david)
>
> "Pieter Wijnen" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Or in this case
>>
>> Dim Cbo AS Office.CommandBar 'needs to be added to references ie
>> microsoft office library
>>
>> Set Cbo=Access.Commandbars("MyBar")
>> Cbo("Button1").Enabled=False
>>
>> Pieter
>>
>> "Arvin Meyer [MVP]" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> Use the click event or the after update event of the control you want to
>>> trigger the action. In an [Event Procedure] use something like the
>>> following:
>>>
>>> Sub MyControl_AfterUpdate()
>>> Me.MyButtonName.Enabled = False
>>> Me.MyOtherButton.Enabled = False
>>> End Sub
>>>
>>> Use another event such as the form's current event to set them back to
>>> True.
>>> --
>>> Arvin Meyer, MCP, MVP
>>> Microsoft Access
>>> Free Access downloads
>>> http://www.datastrat.com
>>> http://www.mvps.org/access
>>>
>>> "SF" <(E-Mail Removed)> wrote in message
>>> news:(E-Mail Removed)...
>>>> I have a combo that display optional action for a listbox on the same
>>> form.
>>>> A have a toolbar with two bottum that use to select/deselect the items
>>>> in
>>>> the listbox. In some activity, I want to disable these two buttons on
>>>> the
>>>> toolbar. How can I change d property of each toolbar button?
>>>>
>>>> SF
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
assessing import specs from VBA Mark VII Microsoft Access VBA Modules 1 4th Jun 2008 12:42 PM
Need help assessing problem. sshes Microsoft Excel Misc 2 19th Jul 2006 11:04 PM
Assessing range values 2 =?Utf-8?B?QWxhbiBN?= Microsoft Excel Programming 1 16th Feb 2005 10:46 PM
Assessing range values. =?Utf-8?B?QWxhbiBN?= Microsoft Excel Programming 2 16th Feb 2005 04:59 PM
Re: Assessing Favorites. purplehaz Windows XP General 3 10th Sep 2003 08:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:17 PM.