Use Query Path in dsum Formula

djwasim

Registered User.
Local time
Today, 15:16
Joined
May 29, 2009
Messages
93
Please Help Me

How to Use Query path instead of Table Path in a Dsum Formulla?

For Instance
I have a Field Named (Qty) in a table Named (Transaction)

Now The Dsum Formula is
=DSum("[qty]","transaction","xdate<forms!frmledger!stdate")

But i want to Use Query instead of table
For instance

I have a feild Named (qty) in a Query Named (Sale Q)

But when i put it into dsum formula as

=DSum("[qty]","Sale Q","xdate<forms!frmledger!stdate")

Then it shows nothing.



Waiting for your help
Wasim Shahzad
 
Queries are treated the same way as tables, it's your syntax that is wrong

=DSum("[qty]","Sale Q","xdate<forms!frmledger!stdate")


Should be

=DSum("[qty]","Sale Q","xdate< #" & forms!frmledger!stdate & "#")

David
 
I am using this formula but there is an error like
#ERROR

=DSum("[qty]","Ledger Q","Transaction Date< [forms]![Ledger Date Frm]![txtdatefrom] AND Lastname='" & [Lastname] & "'")

I think My formula is wrong.
can u help me?
 
did you read my earier posts on using seperators

=DSum("[qty]","Ledger Q","Transaction Date< [forms]![Ledger Date Frm]![txtdatefrom] AND Lastname='" & [Lastname] & "'")

should be
=DSum("[qty]","Ledger Q","[Transaction Date]< #" & [forms]![Ledger Date Frm]![txtdatefrom] & "# AND Lastname='" & [Lastname] & "'")

David

Numbers do not anything
Text types need single quotes
Date types need #'s

David
 
I am using this formula but all in vain

=DSum("[qty]","Sale Q","Transaction Date< [forms]![Ledger Date Frm]![txtdatefrom] AND Lastname='" & [Lastname] & "'")

There is an error Like #ERROR

Plz Help Me.
 
Please refrain from double posting, not only in the same thread but posting duplicate questions under different headings.

David
 
Now there is no any error but there is nothing to show :confused:
 

Users who are viewing this thread

Back
Top Bottom