Count Total Records on Access report

  • Thread starter AnhCVL via AccessMonster.com
  • Start date
A

AnhCVL via AccessMonster.com

I am running an Access database, with a table name Products which contain
Items name, Item descriptions, Item sold, Sold price.

I've create a report to run on a query to base on the Item Sold status ( yes
or No) to narrow down the report and I wanted to indicate the total item sold
or unsold on the report, therefore I've created a lable name lblItemStatus to
indicate such info. Below are my attempts:

Private Sub Report_Open(Cancel As Integer)
lblItemStatus.Caption = Me.Count
End Sub


This return 36 for the caption regardless of how many records are on the
table. I am running MS office XP with 2002 Access. I did a little research on
here and on google as well, didn't find the specific info, so I am posting
this up, hoping to get some help from the experts. Thanks in advance.

Mark.
 
A

Adam Milligan

Drop a text box in the footer of your report. In the text box's control
source put something like this

=count([NameOfAField])

Hope that helps

Adam
 
A

AnhCVL via AccessMonster.com

Hi Adam

I've tried it also, it shows as "#Error" message where the text box is. any
idea why?

Thanks
Mark

Adam said:
Drop a text box in the footer of your report. In the text box's control
source put something like this

=count([NameOfAField])

Hope that helps

Adam
I am running an Access database, with a table name Products which contain
Items name, Item descriptions, Item sold, Sold price.
[quoted text clipped - 14 lines]
 
A

Adam Milligan

Are you putting it in the page footer or the report footer?

AnhCVL via AccessMonster.com said:
Hi Adam

I've tried it also, it shows as "#Error" message where the text box is. any
idea why?

Thanks
Mark

Adam said:
Drop a text box in the footer of your report. In the text box's control
source put something like this

=count([NameOfAField])

Hope that helps

Adam
I am running an Access database, with a table name Products which contain
Items name, Item descriptions, Item sold, Sold price.
[quoted text clipped - 14 lines]
 
A

AnhCVL via AccessMonster.com

I had it on the report footer, I've also tried the page footer as well, show
same error. I guess there was some setting on the form itself, but I got the
total count work by using SQL SELECT query with a Count function, but Thank
you for the advises.

Mark

Adam said:
Are you putting it in the page footer or the report footer?
[quoted text clipped - 18 lines]
 

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