Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    5

    Unanswered: Conditional Count

    I have a field [Tipo] from a table [Rotulos]
    the [Tipo] field the values; PAGO, BONO, LIBRE, RSVD

    i have made a count of th amount of each [Tipo] in a report

    i cant combine the results of each count together

    for example

    Total=count([Tipo] ='PAGO' & 'BONO')

    Total2=count([Tipo] ='LIBRE' & 'RSVD')

    how can this be done

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    OK 2 options

    if you can use SQL use this
    Code:
    SELECT Count(*) AS Total
    FROM tblTest
    WHERE (((tblTest.TIPO)="RSVD" Or (tblTest.TIPO)="PAGO"));
    If you have to use a formula use this

    DCount("[TIPO]","[tbltest]","[TIPO] = " & Chr$(34) & "RSVD" & Chr$(34) & " Or [TIPO] = " & Chr$(34) & "PAGO" & Chr$(34))

    HTH
    Dave

  3. #3
    Join Date
    May 2004
    Posts
    5
    Worked like a charm
    Thanks

Posting Permissions

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