Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    May 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report Format (Access 2000)

    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

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Report Format (Access 2000)

    Yes there is, though it would typically involve creating a report in Access that is based on the data that is returned from a query that provides the criteria. To get the total number of records in the table, you would need to do a Count of the records in the table - the DCount function would do the trick. If you want further help we will need more details about your situation.
    Wendell

  3. #3
    New Lounger
    Join Date
    May 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Format (Access 2000)

    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 creating a report that displays the following:

    Patientname Xray Date Request Fax Time Result Time Duration Over 30 Minutes

    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.

    <img src=/S/help.gif border=0 alt=help width=23 height=15>

  4. #4
    New Lounger
    Join Date
    May 2002
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Format (Access 2000)

    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?
    <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Report Format (Access 2000)

    Unfortunately, details on reports are much like continuous forms - it applies to every record. However you do have an OnFormat event where the code you have might work.

    In any event, you should be able to make the report DataSource be a query which limits your recordset to the records where your GATE_RESULT_OVER_MAX=1 so you don't have to write lots of code to make things work correctly. Then if you want a count of the total number of records in the table, you can do a DCount on the table (not a query) with no constraints. Or if you want to limit the report to a day or a week, the DCount can be done on a query which limits the number of records. Hope this makes sense.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •