[AccessD] Need a Trick for conditional formatting

Darren - Active Billing darren at activebilling.com.au
Wed Sep 20 20:05:18 CDT 2023


R,

I should have mentioned

Have some code in the "On_click" of the command button to test if it’s supposed to be a button or supposed to be 'hidden'

Private Sub cmdButton_Click()
If Me.chkBox = -1 Then
     'do nothing…i’m supposed to be invisible shhhhhhhhh"
Else
      MsgBox "'do something"
End If
End Sub

and have something on the Check Box to trigger the transparent property in the first instance

Private Sub chkBox_Click()
    Detail_Paint
End Sub

and the original bit

Private Sub Detail_Paint()
   Me.cmdButton.Transparent = Me.chkBox
End Sub


--------------------------------------------------------------------------------
> On 21 Sep 2023, at 10:51 am, Darren - Active Billing <darren at activebilling.com.au> wrote:
> 
> Hey Rocky
> 
> it is possible to make a Command Button visible or not visible per row on a continuous form, but not much else.
> 
> Add a button to the continuous form called "cmdButton"
> 
> Assume your Check Box is called "chkBox"
> 
> Add this to the Detail_Paint of the ContForm
> 
> Private Sub Detail_Paint()
>    Me.cmdButton.Transparent = Me.chkBox
> End Sub




> 
> -------------------------------------------------
>> On 21 Sep 2023, at 2:21 am, Rocky Smolin <rockysmolin2 at gmail.com> wrote:
>> 
>> I considered that ploy, having used to to advantage on single forms. But
>> this is a continuous form, so I thought to use conditional formatting which
>> would have worked except...Problem here is that in Access 2010 (which I
>> still develop in to avoid reference conflicts when developing in a later
>> version than my client) conditional formatting (which I need to use because
>> it's a continuous form) does not provide a visible/invisible option.
>> Although I think later versions of Access do.
>> 
>> Tks
>> 
>> r
>> 
>> On Tue, Sep 19, 2023 at 6:47 PM Paul Wolstenholme <
>> Paul.W at industrialcontrol.co.nz> wrote:
>> 
>>> They would disappear if a text box became visible in front of them
>>> (especially so if the text box background matched the section background).
>>> Should the control become selected it reappears - so think about the tab
>>> stop settings.
>>> 
>>> Paul
>>> 
>>> On Wed, 20 Sept 2023 at 12:10, Rocky Smolin <rockysmolin2 at gmail.com>
>>> wrote:
>>> 
>>>> 
>>>> I have a continuous form with a text box.  I use conditional formatting
>>> to
>>>> set the back color of the text box based on the value of another field
>>>> (True/False)  bound to the form in another text box. Works great.
>>>> 
>>>> To the left of that text box there are two check boxes, a text box and a
>>>> combo box. If the True/False field is true the client also wants those
>>> four
>>>> controls to disappear.
>>>> 
>>>> Any ideas?
>>>> 
>>>> MTIA
>>>> 
>>>> Rocky
>>>> 
>>>> 
>>> --
>>> AccessD mailing list
>>> AccessD at databaseadvisors.com
>>> https://databaseadvisors.com/mailman/listinfo/accessd
>>> Website: http://www.databaseadvisors.com
>>> 
>> -- 
>> AccessD mailing list
>> AccessD at databaseadvisors.com
>> https://databaseadvisors.com/mailman/listinfo/accessd
>> Website: http://www.databaseadvisors.com
> 



More information about the AccessD mailing list