Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to Query an entire t

Status
Not open for further replies.

Evette

Programmer
May 10, 2002
9
US
Is there a way to Query an entire table but print only the records that fits a certain criteria? Then have it summerized as total Number of records read and the Total number of record that fits the criteria and it is broken down by day?

I would appreciate any suggestions
I tried the following function intx = DCount("[M-ID]", "GILMORE_TELRAD", "[EGILMORE_TELRAD]![GATE_OVER] = 1 OR IsNull( [EGILMORE_TELRAD]![GATE_OVER] )"

and it gave the result of 61108 and there is only 248 records in the query.

I am creating a report that displays the following:

Patient Name Xray Request Result Duration Over 30 Minutes
Date Fax Time Time

John Doe 2/3/02 11:30 pm 12:25 55 Min 1
Jane Doe 2/3/03 12:01pm 12:45 44 Min 1

Sum 2
Total records for 2/3/02 is 7

I want to be able to read all of the records and get a total but only display the ones that are over the limit.

I have created the two reports separately is there a way that I can combine the two together. I tried but since I am entering in the parameters i get an error.
I took out the previous code and put in this code as a control in my detail section
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If GATE_RESULT_OVER_MAX = 1 Then
Me.Detail.Visible = True
Else
Me.Detail.Visible = False
End If
End Sub

I gave me partically what I needed, I have the summaries as I wanted but it only printed one line of detail for the first day and it did not meet my criteria of Gate_result_Over_Max. Do I need to reset the parameter every time the line is read?
Help!!!

 
You can do exactly what you want with to forms.

First form has the detail of the records you want to disply.

Second form has just the totals for the day.

In the report footer of the first report, place a sub-report which is the second report with just the day totals.

I know this isn't very detailed, but I hope it points you in the right direction.
Pat B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top