title: Get Data by comparing a set of data with a range
body: <p>I am working with an Access Database and using VB/VBA for programming. I have two tbl's as shown below. The first one is to get information and price from vendors. The second one is my own company price range. I want to check for 3 Prices from 3 different Types (1,2,3) of Fruit falling into Min and Max and return the Vendor name based on the Fruit Symbol.</p>
  
  <p>For example:
  If the prices for Apple are 2.1, 2.23, 2.47 falling into the range: 2.1 - 2.55, then accept that vendor's price and return FreshFruit Inc. If not, reject all 3 prices of that fruit Type/Symbol and show an alert message for rejection. </p>
  
  <p>I have tried many different ways with queries, but it is kind of too complex. I am thinking about using scripts instead, but I am not sure about that.</p>
  
  <h2>Vendortbl:</h2>
  
  <h1>Vendor          |Fruit  |Type|Symbol|Price</h1>
  
  <p>FreshFruit Inc. |Apple  |1   |Ap    |2.1</p>
  
  <p>FreshFruit Inc. |Apple  |2   |Ap    |2.23 </p>
  
  <p>FreshFruit Inc. |Apple  |3   |Ap    |2.47</p>
  
  <p>GreenProd LLC.  |Banana |1   |Ba    |0.65</p>
  
  <p>GreenProd LLC.  |Banana |2   |Ba    |0.67</p>
  
  <p>GreenProd LLC.  |Banana |3   |Ba    |0.63</p>
  
  <p>UrFruit Inc.    |Papaya |1   |Py    |1.86</p>
  
  <p>UrFruit Inc.    |Papaya |2   |Py    |1.62</p>
  
  <p>UrFruit Inc.    |Papaya |3   |Py    |1.73</p>
  
  <p>Here is another tbl:</p>
  
  <h2>Rangetbl</h2>
  
  <h1>Fruit  |Symbol|Min  |Max</h1>
  
  <p>Apple  |Ap     |2.1  |2.55</p>
  
  <p>Banana  |Ba     |0.6  |0.65</p>
  
  <p>Papaya  |Py     |1.6  |1.75</p>
  
  <p>Thank you for your help</p>