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  

conditional invisible



 
 
Thread Tools Display Modes
  #1  
Old April 6th, 2010, 09:45 AM posted to microsoft.public.access.forms
garlic
external usenet poster
 
Posts: 1
Default conditional invisible

How to invisible a field(text) when another field (Y/N) is selected No.


Thanks
Alvin
  #2  
Old April 6th, 2010, 11:16 AM posted to microsoft.public.access.forms
jubiiab via AccessMonster.com
external usenet poster
 
Posts: 95
Default conditional invisible

'If you are using combox try this:

If [cboBoxName] = "No" Then
Me.[FieldName].Visible = True
Else
Me.[FieldName].Visible = False
End If

'if you are using checkbox you have to write in the IF statement "False" or "-
1"...i don't remember. Try this:

If [checkBoxName] = False Then
Me.[FieldName].Visible = True
Else
Me.[FieldName].Visible = False
End If

' I think -1 was yes and 0 is No. you can also try this if the above code
didnt work:

If [checkBoxName] = 0 Then
Me.[FieldName].Visible = True
Else
Me.[FieldName].Visible = False
End If


garlic wrote:
How to invisible a field(text) when another field (Y/N) is selected No.

Thanks
Alvin


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201004/1

  #3  
Old April 6th, 2010, 11:40 AM posted to microsoft.public.access.forms
RonaldoOneNil
external usenet poster
 
Posts: 345
Default conditional invisible

In the after update event of this "another field" put this code (substitute
your actual field names where appropriate)

[TextField].Visible = [AnotherField]

"garlic" wrote:

How to invisible a field(text) when another field (Y/N) is selected No.


Thanks
Alvin

  #4  
Old April 6th, 2010, 12:45 PM posted to microsoft.public.access.forms
jubiiab via AccessMonster.com
external usenet poster
 
Posts: 95
Default conditional invisible

I forgot to write that you have to use "On Current" in the form properties

jubiiab wrote:
'If you are using combox try this:

If [cboBoxName] = "No" Then
Me.[FieldName].Visible = True
Else
Me.[FieldName].Visible = False
End If

'if you are using checkbox you have to write in the IF statement "False" or "-
1"...i don't remember. Try this:

If [checkBoxName] = False Then
Me.[FieldName].Visible = True
Else
Me.[FieldName].Visible = False
End If

' I think -1 was yes and 0 is No. you can also try this if the above code
didnt work:

If [checkBoxName] = 0 Then
Me.[FieldName].Visible = True
Else
Me.[FieldName].Visible = False
End If

How to invisible a field(text) when another field (Y/N) is selected No.

Thanks
Alvin


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201004/1

  #5  
Old April 6th, 2010, 11:59 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default conditional invisible

Note that you have to use any of these codes in the Form_Current event
***and*** in the AfterUpdate event of the Yes/No control..

Also note that this code will only work in a Single View Form, not in a
Continuous View or Datasheet View Forms.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201004/1

 




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 02:49 PM.


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