Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Argument pane and Action pane of Macro Design Mode


Message #1 by "Howard Stone" <ququmber@h...> on Sun, 26 Aug 2001 02:04:10
I am confused about the difference between the Condition column in the 

action pane and the Where Condition in the argument pane of the macro 

design mode



I did a lot of research but unable to find a clear cut distinction ond not 

certain which to use.  I notice in some some of my research that if I try 

the condition in either locations it works and sometimes it does not.



Would some one be kind to explain the difference and clear up my confusion.



Thanks a lot
Message #2 by "Susan Henesy" <susan.henesy@w...> on Tue, 28 Aug 2001 11:09:07
Hello, Howard,



You've brought up a very good question.  I think the Condition column 

gives you a lot of flexibility, whereas the WHERE box is really just a 

filter.



For example, I would use WHERE if I wanted to open a form or report WHERE 

a field was equal to something (or not equal to something, depending on 

what you want :). That's just a simple filter.



I use the Condition column when I need to get a little fancier.  I've used 

it to write macros that check to see that certain conditions are satisfied 

when a user is exiting a field.  For example, if a user is about to exit a 

field, but has left it blank -- and it requires a value because of a value 

chosen in a previous field, I could write this in the condition field:



If IsNull([DollarAmount]) AND [Donation]="Yes"



Now this means someone is about to exit "DollarAmount" without giving it a 

value, which is required since "Donation" is equal to "yes".  Then, in the 

ACTION column, I'd enter:



MSGBOX



And write the message in the fields on the lower part of the screen.  The 

next step is to make sure that the user cannot leave the field until a 

dollar amount has been given.  So, to continue the condition in the next 

row, type in an ellipses:



...



The ellipses means that the condition is carried down to the next row.  

Then in ACTION select "CancelEvent", I think, which means the user CAN'T 

exit that field until a dollar amount has been given!



I've also used the Condition column to determine the visibility of labels 

or text boxes on reports, using lots and lots of IF statements.  That was 

actually my very first "fun with conditions" experiment, and it's still 

working to this day.



I hope that helps to answer your question!

Susan

-----------------------------------------------

> I am confused about the difference between the Condition column in the 

> action pane and the Where Condition in the argument pane of the macro 

> design mode

> 

> I did a lot of research but unable to find a clear cut distinction ond 

not 

> certain which to use.  I notice in some some of my research that if I 

try 

> the condition in either locations it works and sometimes it does not.

> 

> Would some one be kind to explain the difference and clear up my 

confusion.

> 

> Thanks a lot

  Return to Index