accessjockey
10-29-2008, 05:00 AM
Hi all,
I would like to add a column to this query that calculates a running total of the 'This Invoice' field.
Here is the query design :
http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=24115&stc=1&d=1225284518
This query will return results based on information provided by the user.
Here is the result if I type in 001 as the project number I would like to look at:
http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=24116&stc=1&d=1225284698
I have attempted to use the DSum function. It works fine however, it completly ignores the parameter criteria of the query and returns a running total of the entire 'Invoices' table. I would like it to return a running total of only the figures relating to the project number I asked it to look at.
Here is the code I used:
RunTot: DSum("ThisInvoice","Invoices","[InvoiceNumber]<=" & [ID] & "")
I would like the 'RunTot' calculated field to return results like this:
http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=24114&stc=1&d=1225285035
What do I need to add to restrict the calculation to the results of the query?
I would like to add a column to this query that calculates a running total of the 'This Invoice' field.
Here is the query design :
http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=24115&stc=1&d=1225284518
This query will return results based on information provided by the user.
Here is the result if I type in 001 as the project number I would like to look at:
http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=24116&stc=1&d=1225284698
I have attempted to use the DSum function. It works fine however, it completly ignores the parameter criteria of the query and returns a running total of the entire 'Invoices' table. I would like it to return a running total of only the figures relating to the project number I asked it to look at.
Here is the code I used:
RunTot: DSum("ThisInvoice","Invoices","[InvoiceNumber]<=" & [ID] & "")
I would like the 'RunTot' calculated field to return results like this:
http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=24114&stc=1&d=1225285035
What do I need to add to restrict the calculation to the results of the query?