Show field depending on answer to previous field

MGB454

New member
Local time
Today, 07:24
Joined
Sep 3, 2008
Messages
4
I have a form which has a question that has a 'yes' or 'no' answer. If the answer is 'yes' the user goes on to the next question. If the answer is 'no' then I want a new field to become visible for the user to add details. How to I do that please?
 
its pretty easy

so you have a question that involves a Yes/No response

in the afterupdate properties of your field you need a bit of coding

ok assume that the question fields is call Questionfield1
and if the answer No you want AnswerNofield to be visible

then you need Answernofield to be set as visible as no

and on the after up code

If Questionfield1= No then
AnswerfieldNo.visible=true

end if

Now if you are storing this info you will also need it on the on load properties of your form as well
 
here it is based on a combo drop down box

Private Sub Combo26_AfterUpdate()
Productname = Combo26.Column(1)
If Me.Product = 1 Then
Me.All_Risks.Visible = False
Me.Cancellation_Sum.Visible = False
Else
Me.All_Risks.Visible = True
Me.Cancellation_Sum.Visible = True
Me.Refresh

now if you change me.product to Yes/no or whatever then you can see it will do stuff

in this example I have if product =1 then All_Risks visible = false so on my form you cannot see the fields All_Risks (in this case a tab page)

the else is in there so that if it isn't a 1 then i want it visible
 
Garypanic.

Thanks for your help..

I will have make the changes and see what happens.

MGB454
 

Users who are viewing this thread

Back
Top Bottom