Filtering out single records

deldridge

New member
Local time
Today, 01:52
Joined
Oct 3, 2012
Messages
4
I have a query that shows our patients and every time they visited us. I then created a report and it all works fine. However, I want to filter OUT those with only a single visit. I only want those with >2 visits. Any ideas?
 
So, I read the link "How to ask questions the smart way" and perhaps I didn't state my question properly.

I have done google, MS Office and Forum searches on how to filter queries or reports so that only patients with multiple visits will show. The results of those searches only tell me how to get rid of duplicates. These are not duplicate records.

The goal is to see the changes in a patient's height and weight over time. So if we only saw a patient once, there is no change and therefore, no need to see them on the query or report. I don't care which one has the filter. Whichever is the easiest to write I suppose.

In my query, I have:

PtID
Age
DateVisit
Height
Weight

My Report is grouped by PtID (Age is 2nd field in that block of the report)
Detail is DateVisit, Height and Weight.

I'm also curious how I could have worded my search to find the answer. I think that peeved me more than not being able to solve this on my own.
 
you should add in PtID criteria
in(Select PtID From [TableName] Group By PtID HAVING count(*)>1)
 
That expression is giving me 0 records returned but I get the path you're leading me on and I'm looking to see what I'm still doing wrong. I'll post if I get it figured out. In the mean time, thanks for turning my head in the right direction. I don't know why I was stuck on the date instead of the ID.
 

Users who are viewing this thread

Back
Top Bottom