multiple task macro

scossar

Registered User.
Local time
Today, 15:11
Joined
Apr 15, 2002
Messages
14
wanting to create a macro that will give different outputs dependent on an input from a combo box

have tried using 'setvalue' and an IIf statement which says :

IIf([Forms]![xxxxx]![typeselect]="1",DateAdd("d",28,(DateAdd("m",5,[Forms]![xxxxx]![yedate]))),"")

which works fine on its own. If I then use a further 'setvalue' (for the same output field) based on a different selection in the combo box it doesn't work and the original 'setvalue' expression also fails to work

any ideas how i can sort this problem out

do i have to use a single 'setvalue' command and integrate all the options and outputs into one expression ????

Tried to put an expression together for all but it was too large.

I think that what is happening is that the "" empty string is clearing the contents of the output once the macro is complete, is there anyway to run the IIf but if the TRUE part of the statement isn't applicable, to leave the original value in the output as it was????
[This message has been edited by scossar (edited 04-16-2002).]

[This message has been edited by scossar (edited 04-16-2002).]
 
In your Macro, you should have a column that is titled: CONDITIONAL (it isn't there by default, you have to go up to View and put a check box for Conditions.

Then in your Conditional column, put the condition that would fire the ACTION. Do NOT use IF in the Conditional statement. Then put your action (SetValue) in the ACTION column.

How to use the Conditional Column:

Put in the condition to fire the Action,
If more than one action will occur based on one condition, put in three ellipsis ( ... ) in the condition row after the condition that causes the actions to fire.

Then, when you have another condition, put it in and the other will end. If the condition isn't met, it will go on to the next, etc.

So, for example, if you wanted to fire actions depending on the value of a checkbox, you would put.

Condition Action
chkYesBox = True SetValue (fill in details in Action Arguments)
... OpenForm (fill in Action arguments)
chkYesBox = False SetValue (blah blah)
... DeleteObject (blah blah)

I hope that helps you. You can have the macro test for many conditions and just put the appropriate actions next to the conditions and use ellipsis as necessary.

BL
 
In your Macro, you should have a column that is titled: CONDITIONAL (it isn't there by default, you have to go up to View and put a check box for Conditions.

Then in your Conditional column, put the condition that would fire the ACTION. Do NOT use IF in the Conditional statement. Then put your action (SetValue) in the ACTION column.

How to use the Conditional Column:

Put in the condition to fire the Action,
If more than one action will occur based on one condition, put in three ellipsis ( ... ) in the condition row after the condition that causes the actions to fire.

Then, when you have another condition, put it in and the other will end. If the condition isn't met, it will go on to the next, etc.

So, for example, if you wanted to fire actions depending on the value of a checkbox, you would put.

Condition Action
chkYesBox = True SetValue (fill in details in Action Arguments)
... OpenForm (fill in Action arguments)
chkYesBox = False SetValue (blah blah)
... DeleteObject (blah blah)

I hope that helps you. You can have the macro test for many conditions and just put the appropriate actions next to the conditions and use ellipsis as necessary.

BL
 

Users who are viewing this thread

Back
Top Bottom