Create a condition in Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My problem is that I want a question to appear right after a "yes/no"
question is responded in my form. If the answer is "yes" I want the new
question to appear, and if the answer is "no" I don't want the new question
to appear on the form. I want to use Condition on Macro, but I'm not sure
what to write on the Condition. Would somebody help me?
 
Sheila:
I wrote [field name] = False and it did not work. Is there another way?
I use the action OpenForm, and the condition: [field name] = False
I wonder if there is another way. Porbably another action selection or
another condition selection.


Sheila D said:
SOmething like [FieldName]=False should do the trick I think

HTH - Sheila
Miguel Vivar said:
My problem is that I want a question to appear right after a "yes/no"
question is responded in my form. If the answer is "yes" I want the new
question to appear, and if the answer is "no" I don't want the new question
to appear on the form. I want to use Condition on Macro, but I'm not sure
what to write on the Condition. Would somebody help me?
 
Miguel - silly question but you are replacing [field name] with your own
field aren't you?

Where have you put the macro? If you want the question to appear then try
attching to the On Exit property or After Update for the YesNo field so that
it checks the value and then responds to the macro command. If you do it on
Open Form at that point the YesNo field has not been responded to - HTH

Sheila

Miguel Vivar said:
Sheila:
I wrote [field name] = False and it did not work. Is there another way?
I use the action OpenForm, and the condition: [field name] = False
I wonder if there is another way. Porbably another action selection or
another condition selection.


Sheila D said:
SOmething like [FieldName]=False should do the trick I think

HTH - Sheila
Miguel Vivar said:
My problem is that I want a question to appear right after a "yes/no"
question is responded in my form. If the answer is "yes" I want the new
question to appear, and if the answer is "no" I don't want the new question
to appear on the form. I want to use Condition on Macro, but I'm not sure
what to write on the Condition. Would somebody help me?
 
Miguel

Can you tell me what else you have in the macro? How are you outputting the
question - is it a message box or another field/label on the form, give me
more detail and I will try to help

Sheila
 
Sheila:
I have chosen an "openform" in "action" to do the question to appear if the
answer to the previous question is "yes". If the answer is "no" the question
should not appear. The format of the "yes/no" question is a checkbox, and the
question that I want to appear when "yes" is chosen is in the same form with
all the questions. The problem that I have is what to write in the condition
to make this happen.
Another situation is I can create a "text" with the "yes/no" choices and
the question that I want to appear might be in a different form. If I do
this, what can I do in Macro to solve this problem, what action should I use?
What condition should I use?
Thanks for help
Miguel
 
Hi Miguel

The condition I gave you does work but if you have it in the After Update
Event it will only work if you actually update the value. Just to be clear,
you have a Yes/No check box and when you check it you want another form to
open - does this form have to show the same record or is it completely
different information? If it's the same record then you will have to have
something to make that happen. What is supposed to happen if the value is No?

Sheila
 
Hi Sheila:
Yes, it worked, I put the macro in the afterupdate and now the question
appears after choosing "yes". Unfortunately, I have another question. Now,
after answering either "yes" or "no" (this is a different question in my form
by the way) I want to make appear a different set of question on the screen
according to the option chosen (yes or no). I have created two macros, one
for each set of question. In other words, I have created a macro that makes
the set of questions to appear after choosing "yes", and I have created
another macro that makes a new set of questions to appear after choosing
"no". However, after choosing any option (yes or no) both set of questions
appear on the screen, what can I do to make the set of questions to appear
according to the previous anwser "yes" or "no"?
The action is "openform", and the question has a checkbox.

Miguel
 
Miguel

You only need 1 macro, it needs to include what to do if the anser is true
and on the next line another condition with what to do if the answer is false

HTH

Sheila
 
Hi Sheila:
I wrote in the first line the questions to appear when the answer "yes" is
chosen equal to "True", and on the following line of the same macro I wrote
the questions to appear if the answer chosen is "no" and made it equal to
"False". However, when either answer is chosen both set of questions appear,
what should I do?

Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top