Making a hide/appear base on a value

F

FrunkaBlunka

Hi,

I have seen numerous topics on this subject but none have helped me.

I have a textbox called txtPaymentDisplay. When txtPaymentDisplay value
is equal to 0 I need a llblPaymentComlete to appear. Now these two are
in a subform. I have a button that refreshs the form data but it is on
my main form which also has that subform on it.

If Me!txtPaymentDisplay.Value = 0 Then
Me!txtPaymentComplete.Visible = True
End If
End Sub

Is my code right?
Which event do I place the code?


Thanks

Blunka
 
S

Steve C, MFS

Hi, Blunka.

Yes, your code is right. Place it in the AfterUpdate event of the
txtPaymentDisplay, or, if that control is not manually editid, then in the
AfterUpdate event of the subform, so that it will run each time you refresh
the subform with your command button.

Hope that helps.
 
Top