A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hidding Fields in forms



 
 
Thread Tools Display Modes
  #1  
Old May 25th, 2004, 04:41 PM
NICK READ III
external usenet poster
 
Posts: n/a
Default 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  
Old May 25th, 2004, 04:54 PM
Rick B
external usenet poster
 
Posts: n/a
Default 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  
Old May 25th, 2004, 07:12 PM
Darrell Childress
external usenet poster
 
Posts: n/a
Default 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  
Old May 25th, 2004, 09:13 PM
Rick B
external usenet poster
 
Posts: n/a
Default 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  
Old May 27th, 2004, 07:33 PM
Darrell Childress
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.