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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Hidding Fields in forms
Is it possible to keep a field hidden in a form until a
spefic piece of data is entered into the form on another field. TA |
#2
|
|||
|
|||
Hidding Fields in forms
Yes. In your OnUpdate code for the 'other' field enter something like...
If SomeField = SomeValue Then FieldToHide.visible = true End If To start the field hidden, change the field's property to visible = no or in your form OnOpen, set it as follows... FieldToHide.Visible = False HTH Rick B "NICK READ III" wrote in message ... Is it possible to keep a field hidden in a form until a spefic piece of data is entered into the form on another field. TA |
#3
|
|||
|
|||
Hidding Fields in forms
Rick,
What would be the code for this similar scenario. Let's say I have 3 fields and the visibility of BOTH Field2 and Field3 depend on the value of Field1. For example, I would want Field2 and Field3 to be invisible to begin with. If Field1 = 1, then I want Field2 to be visible. If Field1 = 2, then I want Field3 to be visible. Hope that wasn't too confusing. Thanks, Darrell Rick B wrote: Yes. In your OnUpdate code for the 'other' field enter something like... If SomeField = SomeValue Then FieldToHide.visible = true End If To start the field hidden, change the field's property to visible = no or in your form OnOpen, set it as follows... FieldToHide.Visible = False HTH Rick B "NICK READ III" wrote in message ... Is it possible to keep a field hidden in a form until a spefic piece of data is entered into the form on another field. TA |
#4
|
|||
|
|||
Hidding Fields in forms
Something like:
If Field1 = 1 Then Field2.visible = True Else If Field1 = 2 Then Field 3.visible = True End If I don't use 'else's very often, so I think that syntax is correct. See the help file if not or post back and I will test it out. Rick B "Darrell Childress" wrote in message .. . Rick, What would be the code for this similar scenario. Let's say I have 3 fields and the visibility of BOTH Field2 and Field3 depend on the value of Field1. For example, I would want Field2 and Field3 to be invisible to begin with. If Field1 = 1, then I want Field2 to be visible. If Field1 = 2, then I want Field3 to be visible. Hope that wasn't too confusing. Thanks, Darrell Rick B wrote: Yes. In your OnUpdate code for the 'other' field enter something like... If SomeField = SomeValue Then FieldToHide.visible = true End If To start the field hidden, change the field's property to visible = no or in your form OnOpen, set it as follows... FieldToHide.Visible = False HTH Rick B "NICK READ III" wrote in message ... Is it possible to keep a field hidden in a form until a spefic piece of data is entered into the form on another field. TA |
#5
|
|||
|
|||
Hidding Fields in forms
Rick,
That was very close and thanks for getting me started. This is what I ended up having to use (bascially, it's 2 separate If statements, one right after the other): If Source = "Other" Then SourceOther.Visible = True Else: SourceOther.Visible = False End If If Source = "Referral" Then Referrer.Visible = True Else: Referrer.Visible = False End If Rick B wrote: Something like: If Field1 = 1 Then Field2.visible = True Else If Field1 = 2 Then Field 3.visible = True End If I don't use 'else's very often, so I think that syntax is correct. See the help file if not or post back and I will test it out. Rick B "Darrell Childress" wrote in message .. . Rick, What would be the code for this similar scenario. Let's say I have 3 fields and the visibility of BOTH Field2 and Field3 depend on the value of Field1. For example, I would want Field2 and Field3 to be invisible to begin with. If Field1 = 1, then I want Field2 to be visible. If Field1 = 2, then I want Field3 to be visible. Hope that wasn't too confusing. Thanks, Darrell Rick B wrote: Yes. In your OnUpdate code for the 'other' field enter something like... If SomeField = SomeValue Then FieldToHide.visible = true End If To start the field hidden, change the field's property to visible = no or in your form OnOpen, set it as follows... FieldToHide.Visible = False HTH Rick B "NICK READ III" wrote in message .. . Is it possible to keep a field hidden in a form until a spefic piece of data is entered into the form on another field. TA |
Thread Tools | |
Display Modes | |
|
|