Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

macro for making a field value determined by the value of another field

Discussion in 'Information Technology' started by kennethburr@sbcglobal.net, Jul 28, 2006.

  1. kennethburr@sbcglobal.net

    Expand Collapse

    I am tried to write a macro (I don't know code) in Microsoft Access
    2003 that will place a certain value in a field#2 depending on what
    value is in field#1. For example if the value in field#1 is any number
    between 0 and 100 then the value of field#2 will be 1, and if the value
    of field#1 is any number between 101 and 200 then the value of field#2
    will be 3, and if the value of field#1 is any number between 201 and
    300 then the value of field#2 will be 10. I just joined this group so
    my question may not be in the right format, but I would greatly
    appreciate any help.
  2. Loading...

    Similar Threads Forum Date
    Microcosm and Macrocosm Gurmat Vichaar Mar 20, 2009
    Adobe Unruffled by Macromedia Restatement (AP) Interfaith Dialogues May 4, 2005
    Macromedia Flash animation and designing. Interfaith Dialogues Oct 21, 2004
    Partition 1947 - The Making Of Refugees History of Sikhism Mar 18, 2015
    Making The Change With Hope & Faith - Sikh Advocate Prabhjot Singh, Md Sikh Youth Mar 11, 2015

  3. arthurjr07@gmail.com

    Expand Collapse

    Use RunSQL macro to run this SQL script.

    UPDATE Table1 Set Table1.FIELD2 =
    IIf(([Table1]![FIELD1]>0 And [Table1]![FIELD1]<101),1,
    IIf(([Table1]![FIELD1]>101 And [Table1]![FIELD1]<201),3,
    IIf(([Table1]![FIELD1]>201 And [Table1]![FIELD1]<301),10,0)));

    hope this will help
  4. kennethburr@sbcglobal.net

    Expand Collapse

    Your suggestion not only works great, but I actually got it to work on
    the first try! Thanks very much for your help!
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     

Share This Page