make a query on your table in the design screen. you want to return the
job and date fields of your table. in criteria for date field it should
be something like:
between [param1] and [param2]
save query and call it x or whatever.
make another one, same table and fields but also return the case and
hours fields.
hit summation button. in the summation row, the job field should be
'group by' the case and hours, 'sum' and the date field should be
'where' with criteria ' < [param1]'
save this as y or whatever
make a new query and select queries x and y and pick and drag the x.job
to the y.job to make a join line, right click the join line and choose
2. now you should have the join line with an arrow head on the y table.
Now return the x.job and y.job. Criteria for y.job should be 'is null'.
y.job can be cleared to not display.
if doesn't work post table fields and someone can write a query for cut
and paste. But you ought to try and learn this show you can do other
queries on your own.
Norma <nj**********@suscom.net> posted in
news:20**************************@posting.google.c om
Phil,
I am trying to decipher what you wrote and put it into language that I
would understand. I am a novice in access SQL. Is there anyway you can
restate all that in laymans terms?
Thanks,
Norma
"Phil" <st***@basketball.net> wrote in message
news:<Wd*****************@newssvr22.news.prodigy.c om>... select x.job from (select t.job from t where t.fldDate between param1
and param2) as x
left join (select t.job, sum(t.cases) as sc, sum(t.hours) as sh,
t.fldDate from
t group by t.job, t.fldDate having t.flddate<param1) as y on x.job =
y.job where y.job is null;
Norma <nj**********@suscom.net> posted in
news:20**************************@posting.google.c om
I am trying to make a query pull data from between the dates I enter
in the parameter but also look back 'in time' to see where 2 other
fields have null values, and only pull data into the query if those
2 fields are null prior to the beginning date of my parameter.
The reason for this (to help make this a little clearer)is to pull
production into a query if it is a 'new' for the month. That is,
never run before the dates entered. I have 2 fields that I am
looking at to see if it is a 'new' product, those fields are hours
and cases. Any help would be greatly appreciated!
Norma
--
Phil