G
GL
Hell
I have a table of Items with the fields ItemCode, Kind, Type, UsedFro
and UsedTo
My goal is to take a report that shows for every item, if the tabl
includes similar items (i.e. of same Kind and Type) that they wil
not be in use for the same period time
The solution I’ve found to do this is to use a report, say i
myReport1, with a subreport, mySubReport1
The Record Source for myReport is the Items table and the Recor
Source for mySubReport1 is the following quey
SELECT Items.ItemCode, Items.Kind, Items.Type, Items.UsedFrom
Items.UsedT
FROM Item
WHERE (((Items.Kind) Like [Reports]![MyReport1]![Kind]) AN
((Items.Type) Like [Reports]![MyReport1]![Type]) AN
((Items.UsedFrom) Not Between [Reports]![MyReport1]![UsedFrom] An
[Reports]![MyReport1]![UsedTo]) AND ((Items.UsedTo) Not Betwee
[Reports]![MyReport1]![UsedFrom] An
[Reports]![MyReport1]![UsedTo])
This works fine, I get some records on the report (the interestin
ones) and their similar used for other periods, according to th
Query criteria, on the subreport.
The problem is that I also get hundreds of records on the reports tha
provide no records on the subreport (the query gives emt
recordsets)
Do you know any way to force the report to show only the record whic
provide data on the subreport and skip the rest ones
Thank
G
I have a table of Items with the fields ItemCode, Kind, Type, UsedFro
and UsedTo
My goal is to take a report that shows for every item, if the tabl
includes similar items (i.e. of same Kind and Type) that they wil
not be in use for the same period time
The solution I’ve found to do this is to use a report, say i
myReport1, with a subreport, mySubReport1
The Record Source for myReport is the Items table and the Recor
Source for mySubReport1 is the following quey
SELECT Items.ItemCode, Items.Kind, Items.Type, Items.UsedFrom
Items.UsedT
FROM Item
WHERE (((Items.Kind) Like [Reports]![MyReport1]![Kind]) AN
((Items.Type) Like [Reports]![MyReport1]![Type]) AN
((Items.UsedFrom) Not Between [Reports]![MyReport1]![UsedFrom] An
[Reports]![MyReport1]![UsedTo]) AND ((Items.UsedTo) Not Betwee
[Reports]![MyReport1]![UsedFrom] An
[Reports]![MyReport1]![UsedTo])
This works fine, I get some records on the report (the interestin
ones) and their similar used for other periods, according to th
Query criteria, on the subreport.
The problem is that I also get hundreds of records on the reports tha
provide no records on the subreport (the query gives emt
recordsets)
Do you know any way to force the report to show only the record whic
provide data on the subreport and skip the rest ones
Thank
G