Query - Help

K

kClark

I have a report that I am working. This is my problem. I
have 4 categories. One is if the employee is under 40
then they fall into two categories Panel 8 and 9. If the
employee has not had a chest x-ray then they are in panel
9. If the employee is 40 and older they fall into the
other two categories Panel 10 and 11. If they do not have
an chest x-ray then they are in Panel 11. This is my
problem I have to take the total number of employees that
fall in panel 9 and panel 11 and take 10% of that total
and mark the report that they need a chest x-ray. I would
appreciate any help.
 
K

Karen

Thanks Larry.

The report starts by pulling all the employees that work
at the facility where the mobile lab testing is being
performed. The query for the cxr is as following:

StrSQL = "Select CXR from Nurse Where [SSNO] = '" & Me!
SSNO & "'"
Set myCXR = dbsMR.OpenRecordset(StrSQL)
If myCXR.RecordCount <> 0 Then
myCXR.MoveFirst
Do Until myCXR.EOF
If CXRValue = False Then
If myCXR!CXR = "N" Or IsNull(myCXR!CXR) Then
CXRValue = True
End If
End If
myCXR.MoveNext
Loop
Else
CXRValue = True
End If

The physician would like only 10% of the total number of
people to have chest x-rays. Would I still use Top N?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top