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
|
|||
|
|||
conditional invisible
How to invisible a field(text) when another field (Y/N) is selected No.
Thanks Alvin |
#2
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|