A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Visible Property



 
 
Thread Tools Display Modes
  #1  
Old March 22nd, 2010, 11:00 PM posted to microsoft.public.access
Joe
external usenet poster
 
Posts: 1,218
Default 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  
Old March 23rd, 2010, 02:13 AM posted to microsoft.public.access
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default 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  
Old March 23rd, 2010, 02:43 PM posted to microsoft.public.access
Tedmi
external usenet poster
 
Posts: 141
Default 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

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.