Visible propoerty

M

Matthew G

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
 
B

Brendan Reynolds

Matthew G said:
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.
 

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