Set One Field based On Another Field

B

Brent Sweet

I think I have a pretty simple request. I am looking for some script to put
on an on exit field. Here is what I need it to do:

When a value is put in say $550, if this is greater than a specified limit
in the code I need it to set Field2 to Yes.

So if field1 > 500 set field2 = yes

Real world example:

I have a dollar amount of credit to give to a customer, I want to auto
populate the approval required field with a yes.

Your help is appreciated.
 
G

Gina Whipp

John,

Oops, you are correct! Big THANKS!

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

J_Goddard via AccessMonster.com said:
Hi Gina -

Based on A2003:

What version of the IIF is that? IIF requires 3 arguments, and returns a
value; it does not perform an action. Your example won't compile in
A2003.

Brent :

You can set Field2 in one line: [field2] = ( [field1] > 500 )

John



Gina said:
Brent,

Try: IIf([Field1]>500,[Field2]="Yes") However if the field is a Bit data
type then IIf([Field1]>500,[Field2]=True)
I think I have a pretty simple request. I am looking for some script to
put
[quoted text clipped - 11 lines]
Your help is appreciated.

--
John Goddard
Ottawa, ON Canada
jrgoddard at cyberus dot ca

Message posted via AccessMonster.com
 

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