If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Visible Property
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 |
#2
|
|||
|
|||
Visible Property
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" wrote in message ... 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 |
#3
|
|||
|
|||
Visible Property
Even simpler:
Me.btnContinuePaymentValidation.Visible = (Me.txtPayAmtTotal = Me.txtCheckAmountTotal) -TedMi "Jeanette Cunningham" wrote in message ... 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" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|