Results 1 to 2 of 2
  1. #1
    vennies83 is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    5

    If Statement Help

    Hey guys,



    Not sure this is even possible. I have a database of over 2.3 million rows and want to run an if statement. I want to see if 2011 charges = 2010 charges by location. If they do, return "MATCH", if they don't, return "NO MATCH". I know it's simple, but I have had no luck getting anything.

    Is it possible to do an IF statement of a value equaling another value exactly, instead of equaling some word or indicator?

    One more simple question related to querying:

    If I have a list of thousands of locations that are numbered, how do I search and return more than one location? It's easy to use Like for 1 location. Thinking choose can return more than location? How would that looked formatted?

    Thanks for your time. I appreciate any feedback.

  2. #2
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    Are the values for 2010 in a different field than 2011?

    As to your second question, there are several ways to do this.

    If you want to see all locations beginning with the number 1, then use Like 1*

    If you want to see all locations beginning with the numbers 15, then use Like 15*

    Finally, if you wish to include a series of locations then you could use the In function, ie. IN(1056, 2067, 5084, etc.)

    You might find this helpful
    http://www.techonthenet.com/access/queries/index.php
    Alan

Please reply to this thread with any new information or opinions.

Similar Threads

  1. BETWEEN in a FROM Statement
    By Cyborg in forum Queries
    Replies: 6
    Last Post: 05-12-2011, 01:54 PM
  2. If Statement
    By ajolson1964 in forum Access
    Replies: 1
    Last Post: 05-11-2011, 07:51 AM
  3. Help with an Iif statement please
    By 10 Gauge in forum Programming
    Replies: 4
    Last Post: 04-05-2011, 06:02 AM
  4. Help with IF statement
    By mkallover in forum Programming
    Replies: 7
    Last Post: 01-04-2011, 04:47 PM
  5. IIf Statement
    By dref in forum Forms
    Replies: 2
    Last Post: 07-16-2010, 02:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums