Footer Totals

  • Thread starter open a adobe file from a command button
  • Start date
O

open a adobe file from a command button

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
 
F

fredg

On Thu, 18 Feb 2010 13:10:02 -0800,
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.
 
O

open a adobe file from a command button

Thank you for responding. I have 3 tables, tbl-Vendor, tbl-People, and
tbl-LinkingTable, a many 2 many setup. When I select a vendor from the
combo box I want to count all the “PeopleIDâ€s in the linkingtable that match
the vendorId that was selected on the form using the “findVendor†control.
The linkingTable has these fields, VendorId, PeopleId, Dept, OrgNo, Date,
Amount. I edited your code and have entered variations of it with no
success. This is the most resent failure
"=DCount("*","LinkingTable","[PeopleId] = '" & Me.[FindVendor.Vendorid])"

Thank You Again!!!


fredg said:
On Thu, 18 Feb 2010 13:10:02 -0800,
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
.
 

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