S
studlength
Hello all,
I have created a macro that makes some fields on a form visible and
others not visible depending on the selection made from a dropdown
list. Here is a portion of the current macro:
Line 1:
Condition= [Form]![Field1]="Caps"
Action= SetValue
Item= [Field2].[Visible]
Expression= No
Line 2:
Condition= [Form]![Field1]="Caps"
Action= SetValue
Item= [Field3].[Visible]
Expression= No
Line 3:
Condition= [Form]![Field1]="Caps"
Action= SetValue
Item= [Field4].[Visible]
Expression= No
So if "Caps" is chosen in Field1, then Field2, Field3, and Field4 are
not visible.
This is working great. However, this is just a small example of the
macro. What I need is a faster way to write this thing. I would like
to be able to combine these 3 lines into 1 line, but I'm not sure if
or how it can be done. I have tried the following:
Condition= [Form]![Field1]="Caps"
Action= SetValue
Item= [Field2].[Visible] AND [Field3].[Visible] AND [Field4].[Visible]
Expression= No
I was just guessing but I thought it might work. It didn't, but I hope
you can see what I am trying to do. Is there a way to combine these 3
lines into 1 line?
I have created a macro that makes some fields on a form visible and
others not visible depending on the selection made from a dropdown
list. Here is a portion of the current macro:
Line 1:
Condition= [Form]![Field1]="Caps"
Action= SetValue
Item= [Field2].[Visible]
Expression= No
Line 2:
Condition= [Form]![Field1]="Caps"
Action= SetValue
Item= [Field3].[Visible]
Expression= No
Line 3:
Condition= [Form]![Field1]="Caps"
Action= SetValue
Item= [Field4].[Visible]
Expression= No
So if "Caps" is chosen in Field1, then Field2, Field3, and Field4 are
not visible.
This is working great. However, this is just a small example of the
macro. What I need is a faster way to write this thing. I would like
to be able to combine these 3 lines into 1 line, but I'm not sure if
or how it can be done. I have tried the following:
Condition= [Form]![Field1]="Caps"
Action= SetValue
Item= [Field2].[Visible] AND [Field3].[Visible] AND [Field4].[Visible]
Expression= No
I was just guessing but I thought it might work. It didn't, but I hope
you can see what I am trying to do. Is there a way to combine these 3
lines into 1 line?