Query Records since last run



I am trying to do what I thought would be simple, but am finding it
difficult.
I want to write a query which extracts all records from a table suign a
date criteria. I want to store this date somewhere, and then next time
I run the same query, I want to extract only records since the last
time the query was run.

e.g - first time I run the query (on 06/08/05) I extract these.

Customer Sales Date Sales Value
AB001 05/08/05 12.00
AB003 05/08/05 18.20
AB001 06/08/05 13.00


Next Time I run the query, (on 08/08/05) the 'Sales' Table contains

Customer Sales Date Sales Value
AB001 05/08/05 12.00 Not needed
AB003 05/08/05 18.20 Not needed
AB001 06/08/05 13.00 Not needed
AB001 07/08/05 17.65 << want this
AB001 07/08/05 13.55 << Want This
AC004 08/08/05 25.00 << Want This

I.e. I only want to extract records added to the sales table SINCE
06/08/2005,

I cannot 'prompt' for the last-run date, since I am trying to automate
this query to ru overnight (using Macro's and Windows Scheduler)

NOTE: all the dates I illustrate are UK format, ie. (dd/mm/yy)
Any idea's ?
all help gratefully appreciated.

.



Relevant Pages

  • Re: Query Records since last run
    ... Store the value in a table, text file, registry setting, or global variable. ... and retrieve it before or during the query. ... > Customer Sales Date Sales Value ... I only want to extract records added to the sales table SINCE ...
    (microsoft.public.access.queries)
  • Re: How to sum the table records?
    ... I using the "list" function to extract the sales text delimited file ... I'm sure it's possible in one query, but I'm not familiar enough with JOINS ... That's more of a database question, ...
    (comp.lang.php)
  • RE: Reduce # of date columns in crosstab query
    ... "Sales by Product temp" for that product, so it won't show up no matter how I ... it from the final calculation in the crosstab query. ... the criteria out of the crosstab and into something like the original query. ... You could use the column headings to limit the number of columns; ...
    (microsoft.public.access.queries)
  • Re: Was: what does "serialization" mean?
    ... > The data volumes in the case of Walmart are huge ... the sales and inventory database has ... WHATEVER would probably be a separate query to summarize total sales. ... Indeed the psychology of hardware efficiency encourages flaccid design ...
    (comp.programming)
  • Re: Incorrect subtotals in a report
    ... You can create multiple values by combining a crosstab and cartesian query. ... > sales, ... > Subsection 01 subtotals for all of the above quantities. ... whilst the daily totals are incorrect. ...
    (microsoft.public.access.reports)