A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Set One Field based On Another Field



 
 
Thread Tools Display Modes
  #1  
Old November 18th, 2009, 06:56 PM posted to microsoft.public.access.forms
Brent Sweet
external usenet poster
 
Posts: 4
Default Set One Field based On Another Field

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.
  #2  
Old November 18th, 2009, 07:02 PM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Set One Field based On Another Field

Brent,

Try: IIf([Field1]500,[Field2]="Yes") However if the field is a Bit data
type then IIf([Field1]500,[Field2]=True)

--
Gina Whipp

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

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

"Brent Sweet" wrote in message
...
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.



  #3  
Old November 19th, 2009, 05:29 PM posted to microsoft.public.access.forms
J_Goddard via AccessMonster.com
external usenet poster
 
Posts: 221
Default Set One Field based On Another Field

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 Whipp wrote:
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
http://www.accessmonster.com/Uwe/For...forms/200911/1

  #4  
Old November 19th, 2009, 05:38 PM posted to microsoft.public.access.forms
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Set One Field based On Another Field

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" u37558@uwe wrote in message
news:9f5b812f4bfe0@uwe...
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 Whipp wrote:
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
http://www.accessmonster.com/Uwe/For...forms/200911/1



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.