Note that there are some explanatory texts on larger screens.

plurals
  1. POAccess query to return several similar records when one is flagged
    primarykey
    data
    text
    <p>I have an Access Database with a table [tblPriData] that contains the following pertinent fields populated with data:</p> <ul> <li><em>[tblPriData].[priStkCode]</em> - name of the item </li> <li><em>[tblPriData].[priDate]</em> - date of item’s purchase </li> <li><em>[tblPriData].[priOrigPrice]</em> - cost per item at time of purchase </li> <li><em>[tblPriData].[priPriceConfirmed]</em> – a boolean, if set to TRUE it confirms that a purchase price is no longer an estimate but an actual amount</li> </ul> <p>When new transactions are entered into the table, their [priOrigPrice] is initially estimated based off historical values and their [priPriceConfirmed] is set to FALSE. Later in the month when the actual invoices arrive, the [priOrigPrice] is adjusted to the proper amount and the [priPriceConfirmed] is then set to TRUE. </p> <p><strong>How do I run a query that will display <em>all</em> of the records for matching [priStkCode] if the [priPriceConfirmed] is set to FALSE for <em>any</em> of the entries that share the matching [priStkCode]?</strong></p> <p>As an illustration, if the table contained the following data:</p> <pre><code>priStkCode priDate priOrigPrice priPriceConfirmed AAA 1/1/13 $100 Yes AAA 2/1/13 $150 Yes AAA 3/1/13 $150 No BBB 1/1/13 $10 Yes BBB 2/1/13 $10 Yes CCC 3/1/13 $45 No </code></pre> <p>The query would return all of the AAA entries and all of the CCC entries:</p> <pre><code>priStkCode priDate priOrigPrice priPriceConfirmed AAA 1/1/13 $100 Yes AAA 2/1/13 $150 Yes AAA 3/1/13 $150 No CCC 3/1/13 $45 No </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload