Logical Nots in Subreports

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone please tell me if this is possible in Access:

I am trying to generate a report that lists a person who
has a reservation at a hotel that includes a subreport of
all the roomates that person has.

I have this query to find the roomates:

Select Name from table_people as A, table_people as B
Where A.roomID = B.roomID AND A.PID <> B.PID

To be verbose, I am trying to grab all the people in the
same room that do not have the ID number of the person I am
currently processing. (Does that make scence?)

I wrote this with the assumption that a linked report would
iterate through the values from the main report and plug
them into my equality tests.

My question is two-fold. How do link Access reports
process interacting queries (all at once? or step-by-step?)
and How can I exclude records in the subreport based on
values from the main report?

Thank you for accepting this challenge
 
By linking the report and the subreport by roomID I can see all the
people who are in the same room, which is useful. But my questions
still remain? How do I exclude the current record (in the main report)
from the list of those who are in the room (in the subreport)?

I think my tests conclude that subreports do generate based on each
iterative step. Otherwise how can I get subreports with only
information that relates to the current roomID?

So I only have one unaswered question. Is anyone willing to take up the
challenge?

Chris
 
Back
Top