Filter records be initial appointment type but then include all subsequent entries (1 Viewer)

gojets1721

Registered User.
Local time
Today, 06:52
Joined
Jun 11, 2019
Messages
430
Apologies for the likely confusing title. I've included an example database.

Essentially, I'm looking to create a query that filters down to all 'inspection' appointment types, but also includes any subsequent appointments regardless of type. So if the customer had a different appointment type after the inspection, those would be included in the query too.

Please let me know if I didn't explain it well enough. I'm basically trying to query down to additional appts that could have been triggered from an inspection (in my actual database)

Thanks
 

Attachments

  • Example01.accdb
    516 KB · Views: 411

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:52
Joined
May 7, 2009
Messages
19,245
Union Query?
 

plog

Banishment Pending
Local time
Today, 08:52
Joined
May 11, 2011
Messages
11,646
Build a query to find the first Inspection date for each CustomerID. Then build another query using that query and your table to pull all the records of those customers that occured after their first inspection date.
 

gojets1721

Registered User.
Local time
Today, 06:52
Joined
Jun 11, 2019
Messages
430
So I created a query to find the first inspection date. I'm not sure how to do the second part too in regard to using that query with the original table to find the other appts tho
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:52
Joined
May 7, 2009
Messages
19,245
see Query1.
 

Attachments

  • Example01.accdb
    516 KB · Views: 260

plog

Banishment Pending
Local time
Today, 08:52
Joined
May 11, 2011
Messages
11,646
What does your first query look like? Post the SQL or another database.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:52
Joined
May 7, 2009
Messages
19,245
See also Query2.
 

Attachments

  • Example01.accdb
    516 KB · Views: 405

Users who are viewing this thread

Top Bottom