Conditional Setvalue

  • Thread starter Thread starter KCanon
  • Start date Start date
K

KCanon

I am trying to use SetValue in a macro on a form to set
the value of one field based on an entry in another field.

I have been able to simply assign a value to the target
field, but what I really need to do is set the value only
under certain conditions. Such as, If [PLACE]
= 'Residence' then set the value to [ADDRESS].

I am not very experienced at Access, but have done a good
bit of programming in a past life. Is SetValue what I
need to use to accomplish this, or am I on the wrong
track. The built-in Help in Access is incredibly UN-
Helpful! (Or is it just me?!)

Thanks to anyone who can offer advice.
 
you're right about Access Help, the less you know the
harder it is to get the help you need!

yes, you can create a conditional macro action.
in the macro design window, click View, Conditions to show
the Condition column (if it's not already visible).
a conditional action will run when the expression in the
Condition column evaluates to True.
so your condition would be [PLACE]="Residence"
your action would be SetValue, arguments Item and
Expression.

hth
 
Back
Top