Conditional Setvalue

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.
 
T

tina

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top