Visible Property

J

Joe

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
 
J

Jeanette Cunningham

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
 
T

TedMi

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top