Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Oct 2001
    San Bernardino, California, USA
    Thanked 0 Times in 0 Posts

    =dcount (Xp, 2000)

    I am having trouble getting a record count to print in a report. I am trying to obtain the count of tapes with a unique barcode. I have a query (qryUniqueTapeBarcodes) that returns a list of unique bar codes. The record count at the bottom of the query is correct and I need that count to show in a formatted report. I have created a report with all the labels that I need. For the record count, I created a textbox and put =dcount([qryUniqueTapeBarcodes]![Barcode/File #]) as the control source. All my labels and the text box are in the report header as I do not want anything repeated for each record in the query. Problem is that my text box does not show anything and when I go back and look at the properties, the control source is empty.

    If I use count instead of dcount, it is displays as an error on the report.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 29 Times in 29 Posts

    Re: =dcount (Xp, 2000)

    The expression =dcount([qryUniqueTapeBarcodes]![Barcode/File #]) is not correct. The syntax is =DCount("FieldName", "TableName", "WhereCondition"), where the third argument is optional. Try

    =DCount("*", "qryUniqueTapeBarcodes")

Posting Permissions

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