Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / November 2005

Tip: Looking for answers? Try searching our database.

Create a condition in Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Miguel Vivar - 14 Nov 2005 14:45 GMT
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 D - 14 Nov 2005 17:06 GMT
SOmething like [FieldName]=False should do the trick I think

HTH - Sheila

> 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 Vivar - 14 Nov 2005 17:42 GMT
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.

> SOmething like [FieldName]=False should do the trick I think
>
[quoted text clipped - 5 lines]
> > 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 D - 15 Nov 2005 17:19 GMT
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

> Sheila:
> I wrote [field name] = False and it did not work. Is there another way?
[quoted text clipped - 11 lines]
> > > 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 Vivar - 14 Nov 2005 18:10 GMT
Sheila:
Both answers (yes and no) still make the question to appear

> 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 D - 16 Nov 2005 10:31 GMT
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:
> Both answers (yes and no) still make the question to appear
[quoted text clipped - 4 lines]
> > 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 Vivar - 16 Nov 2005 22:11 GMT
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

> Miguel
>
[quoted text clipped - 12 lines]
> > > 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 D - 17 Nov 2005 10:10 GMT
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

> Sheila:
> I have chosen an "openform" in "action" to do the question to appear if the
[quoted text clipped - 26 lines]
> > > > 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 Vivar - 16 Nov 2005 22:38 GMT
Sheila:
Just to let you know; I put the Macro in the AfterUpdate.

> Miguel
>
[quoted text clipped - 12 lines]
> > > 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 Vivar - 17 Nov 2005 13:39 GMT
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

> Sheila:
> Just to let you know; I put the Macro in the AfterUpdate.
[quoted text clipped - 15 lines]
> > > > 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 D - 17 Nov 2005 14:18 GMT
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:
> Yes, it worked, I put the macro in the afterupdate and now the question
[quoted text clipped - 31 lines]
> > > > > 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 Vivar - 21 Nov 2005 18:10 GMT
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

> Miguel
>
[quoted text clipped - 40 lines]
> > > > > > 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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.