A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Footer Totals



 
 
Thread Tools Display Modes
  #1  
Old February 18th, 2010, 10:10 PM posted to microsoft.public.access.tablesdbdesign
open a adobe file from a command button
external usenet poster
 
Posts: 21
Default Footer Totals

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

  #3  
Old February 19th, 2010, 01:18 AM posted to microsoft.public.access.tablesdbdesign
open a adobe file from a command button
external usenet poster
 
Posts: 21
Default Footer Totals

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" wrote:

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
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:17 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.