Count in a textbox

accesslevel

Registered User.
Local time
Today, 21:45
Joined
Feb 10, 2003
Messages
12
Hey all,

How come I either get a #name or #Error in my textbox when I try to count the records from my query

I have tried:

=Count([query1!invoiceid]) which give me an #error

and I have tried setting the Totals in my query to Count but that gives me a #Name

:/

Please help!
 
Put =Count([InvoiceID]) in a control in the footer of your form. I have assumed that InvoiceID is a control on your form...

hth,
Jack
 
just to clarify:

I want to count the amount of records found in a table with a criteria attached.

To do this I have created a query that looks into a table called tblInvoice and has a criteria on the field marked invoiceID (the criteria is: [forms]![frmInvoice].[InvoiceCode] which is the current invoice that is open and is a control)

what I have now is another control which now uses the:

=Count([Query1!invoiceID])

but it comes out with #Name?

:/
 
If the form is based on the filtered query then the solution I gave you will work. If the Query is not used by the form then use the DCount() function to get the number of records in your filtered query.

=DCount("*", "QueryName")

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom