Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dependent Fields in Access Forms? Hiding?

Status
Not open for further replies.

suzann

Technical User
Joined
Mar 5, 2003
Messages
1
Location
US
I am trying to create a simple form for users in Access. I have a Yes/No tick box which allows the user to say press Yes or No. If they press Yes, I want another field to appear allowing them to enter futher details. If they press No I do not want the additional field to confuse them. Can I hide the field and somehow make it appear if the other field is activated? Is there another way this can be done?
Many Thanks
 
Yes you can

After you create the form. Select the field you want to hide, open properties, on the all tab. Change visible to “No”.
(You will have to do this for all the fields you want to hide)

Now you want the properties for the yes button
On the event tab
Select the on click build button, select code builder option and click ok.
Type “Me.Field.Visible = True
Me = this form
Field = Field that you want to become visible
Visible = Property of that field
True = yes you want to see the field

You will have to do this for each field that you want to see.

Depending on how you have it setup you might want to include code to put the focus on a specific field or, enable one field at a time.


Hope this helps

RITec :-)
 
Here is my reply to a similiar question

thread68-482575 We are always looking for new members at our computer forums: Please come join our community too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top