View Single Post
  #2  
Old April 7th, 2009, 09:33 AM posted to microsoft.public.access
Brendan Reynolds
external usenet poster
 
Posts: 1,241
Default Visible propoerty


"Matthew G" wrote in message
...
Hi,

I am trying to build a database for work that will track the progress of
orders. I want to be able to make fields on my form visible or invisisble
based on the value I put in another field. I have tried searching the
help
file but can't find what I need. Can anyone help please?

Thanks


Here's an example that will hide a text box named "txtTwo" if the value
entered in another text box named "txtOne" is greater than 10.

If Me.txtOne 10 Then
Me.txtTwo.Visible = False
Else
Me.txtTwo.Visible = True
End If

You'd put this code in the AfterUpdate event procedure of the text box named
"txtOne", so that it fires each time the value in that text box changes, and
also in the Current event procedure of the form, so that it fires when the
user moves from one record to another.

--
Brendan Reynolds