Visible Property

  • Follow


Hello,

I'm trying to enter the following code in a form but its not working the way 
I want it.  This is what i'm trying to accomplish.  The 
btnContinuePaymentValidation runs a macro that takes the user to a different 
form once the user is done entering the data on the form.  However, I only 
want the button to appear when txtPayAmtTotal = txtCheckAmountTotal.  
Othwerwise the suer will continue without balancing for the day.

Private Sub Form_Dirty(Cancel As Integer)
If Me.txtPayAmtTotal = Me.txtCheckAmountTotal Then
    Me.btnContinuePaymentValidation.Visible = True
Else
Me.btnContinuePaymentValidation.Visible = False
End If

Any feedback will be appreciated...

Thank You
0
Reply Utf 3/22/2010 11:00:01 PM

You can put code in the after update event of every updateable control like 
this:

 If Me.txtPayAmtTotal = Me.txtCheckAmountTotal Then
    Me.btnContinuePaymentValidation.Visible = True
 Else
    Me.btnContinuePaymentValidation.Visible = False
 End If



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia




"Joe" <Joe@discussions.microsoft.com> wrote in message 
news:205995E7-66D0-4FF7-AF76-1725D390BC4C@microsoft.com...
> Hello,
>
> I'm trying to enter the following code in a form but its not working the 
> way
> I want it.  This is what i'm trying to accomplish.  The
> btnContinuePaymentValidation runs a macro that takes the user to a 
> different
> form once the user is done entering the data on the form.  However, I only
> want the button to appear when txtPayAmtTotal = txtCheckAmountTotal.
> Othwerwise the suer will continue without balancing for the day.
>
> Private Sub Form_Dirty(Cancel As Integer)
> If Me.txtPayAmtTotal = Me.txtCheckAmountTotal Then
>    Me.btnContinuePaymentValidation.Visible = True
> Else
> Me.btnContinuePaymentValidation.Visible = False
> End If
>
> Any feedback will be appreciated...
>
> Thank You 


0
Reply Jeanette 3/23/2010 2:13:02 AM


Even simpler:
Me.btnContinuePaymentValidation.Visible = (Me.txtPayAmtTotal = 
Me.txtCheckAmountTotal)
-TedMi

"Jeanette Cunningham" <nnn@discussions.microsoft.com> wrote in message 
news:efRIk5iyKHA.2436@TK2MSFTNGP04.phx.gbl...
> You can put code in the after update event of every updateable control 
> like this:
>
> If Me.txtPayAmtTotal = Me.txtCheckAmountTotal Then
>    Me.btnContinuePaymentValidation.Visible = True
> Else
>    Me.btnContinuePaymentValidation.Visible = False
> End If
>
>
>
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
>
>
>
> "Joe" <Joe@discussions.microsoft.com> wrote in message 
> news:205995E7-66D0-4FF7-AF76-1725D390BC4C@microsoft.com...
>> Hello,
>>
>> I'm trying to enter the following code in a form but its not working the 
>> way
>> I want it.  This is what i'm trying to accomplish.  The
>> btnContinuePaymentValidation runs a macro that takes the user to a 
>> different
>> form once the user is done entering the data on the form.  However, I 
>> only
>> want the button to appear when txtPayAmtTotal = txtCheckAmountTotal.
>> Othwerwise the suer will continue without balancing for the day.
>>
>> Private Sub Form_Dirty(Cancel As Integer)
>> If Me.txtPayAmtTotal = Me.txtCheckAmountTotal Then
>>    Me.btnContinuePaymentValidation.Visible = True
>> Else
>> Me.btnContinuePaymentValidation.Visible = False
>> End If
>>
>> Any feedback will be appreciated...
>>
>> Thank You
>
> 


0
Reply TedMi 3/23/2010 2:43:19 PM

2 Replies
164 Views

(page loaded in 0.076 seconds)

Similiar Articles:
















7/18/2012 6:03:48 AM


Reply: