Help with Form results from Query

hullstorage

Registered User.
Local time
Today, 00:28
Joined
Jul 18, 2007
Messages
213
Hi all,

I am trying to create a form that shows the sum results for a given customer using a combo box from a query
then once the results are displayed these can then be exported to another table

here are the contents of the query

Date CustomerName Amount Show
12/11 Simon 25.00 True
12/11 Simon 10.00 True
13/11 Simon 10.00 True


So the query itself shows only records that = True
for the customer selected from the combo box

I then want these to show on the form and add up
the total amount

Then i will create a button for the results to be exported
to another table

thanks
simon
 
Simply do a DSum on the field where the customer = x and the condition = true.
 
Simply do a DSum on the field where the customer = x and the condition = true.

how do i do the dsum function

the customer field is
account_name
(this is from the form called CreateInvoice )

the sum name is
£cost

where the invoiced field is
False

thanks

simon
 
MyField = DSum("ValueField","TableOrQueryName","SearchField=" & Condition)

If Searchfield = Numeric - as above
if String enclose quotes
if Date enclose #'s

David
 

Users who are viewing this thread

Back
Top Bottom