K
Karen C
I have this query:
StrSQL = "SELECT DistinctRow [Exam Schedule].EXAMLOC,
VanTestHistory.Date, VanTestHistory.Name,
VanTestHistory.CXRClass " & _
"FROM VanTestHistory INNER JOIN [Exam
Schedule] ON VanTestHistory.SSNO = [Exam Schedule].SSNO "
& _
"WHERE [Exam Schedule].EXAMLOC = '" & Me!
EXAMLOC & "' " & _
"AND VanTestHistory.Date Is Not Null " & _
"And VanTestHistory.SSNO = '" & Me!SSNO & "' "
This gives me everyone who has had a Van Test before. I
then have to check if they have had a Chest x-ray in the
last 5 years. I can do all this but I then have to take
everyone who hasn't had a chest x-ray and only take 10% of
them to print on my report that they need a chest x-ray.
I can't use the TOP 10 PERCENT in my query because my
clients wants the oldest individuals that need to have a
xray to make up that 10%. any ideas would be helpful.
Thanks
Karen
StrSQL = "SELECT DistinctRow [Exam Schedule].EXAMLOC,
VanTestHistory.Date, VanTestHistory.Name,
VanTestHistory.CXRClass " & _
"FROM VanTestHistory INNER JOIN [Exam
Schedule] ON VanTestHistory.SSNO = [Exam Schedule].SSNO "
& _
"WHERE [Exam Schedule].EXAMLOC = '" & Me!
EXAMLOC & "' " & _
"AND VanTestHistory.Date Is Not Null " & _
"And VanTestHistory.SSNO = '" & Me!SSNO & "' "
This gives me everyone who has had a Van Test before. I
then have to check if they have had a Chest x-ray in the
last 5 years. I can do all this but I then have to take
everyone who hasn't had a chest x-ray and only take 10% of
them to print on my report that they need a chest x-ray.
I can't use the TOP 10 PERCENT in my query because my
clients wants the oldest individuals that need to have a
xray to make up that 10%. any ideas would be helpful.
Thanks
Karen