Thread: Footer Totals
View Single Post
  #2  
Old February 18th, 2010, 10:22 PM posted to microsoft.public.access.tablesdbdesign
fredg
external usenet poster
 
Posts: 4,386
Default Footer Totals

On Thu, 18 Feb 2010 13:10:02 -0800,
wrote:

I have a form that uses a combo box to select which vendor I want to see.
When you select the vendor, it shows the people that use that vendor. I want
to add a text box to the footer that shows a total number of people using
that vendor and the total amount of money being used. Can someone help me?
Please!!

Thanks


Look up the DCount and DSum functions in VBA help.

Using an unbound text control":

=DCount("*","TableName","[Vendor] = '" & Me.[ComboName] & "'") & "
customers spent " & DSum("[MoneyUsed]","TableName","[Vendor] = '" &
Me.[ComboName] & "'") & " dollars."

138 customers spent 12365.96 dollars.

Change the field and table names as needed.
The above assumes [Vendor] is a Text datatype field.


--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail