Results 1 to 2 of 2
  1. #1
    splashy is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2014
    Posts
    1

    How to assign a data range for a particular value.

    Hi there!


    I am trying to create a database for calculating costs of shipping an item depending on the postcode. Here is a picture that explains what I am trying to create: http://i.imgur.com/VrnBkTE.png


    So as you can see, in region N1, the cost is $9.90 and covers the postcodes between 1000-2000, 2030, 2050-2070. I want to assign these values to the region N1 with the cost $9.90 so that when I look it up on the query, it shows the correct price. For example, if I were to enter 3502, I would expect it to show that it is in region N2 with a cost of $15.30.


    I cannot figure out how to enter a data range to make this easy. Any help would be greatly appreciated!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    The table needs two fields for the range - [begin] and [end].

    Then a record for each range for each region.

    SELECT * FROM Prices WHERE [enter post code] BETWEEN [begin] AND [end];
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 8
    Last Post: 08-17-2023, 02:33 AM
  2. Replies: 14
    Last Post: 01-07-2014, 04:20 PM
  3. Replies: 6
    Last Post: 09-24-2013, 06:02 PM
  4. Data range for Web Forms
    By need_help12 in forum Forms
    Replies: 7
    Last Post: 05-11-2012, 04:20 PM

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