Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSum

Status
Not open for further replies.

seke

Programmer
Joined
Nov 30, 2002
Messages
14
Location
PT
I Have a table called tblWorkSheet within a field called GROSS for the Gross amount, also a field called WACTIONDATE the date of the transaction. A field called WSTATUS has two values Paid or Unpaid.

I use a Select Query to find the Gross Total for each month using:

JAN: Format(DSum("[GROSS]","[tblWorkSheet]","Month([WACTIONDATE]) = '1'"),"Fixed")

this works fine

to find the total Gross paid I used the following:

JAN: Format(DSum("[GROSS]","[tblWorkSheet]","Month([WACTIONDATE]) = '1'" And "[WSTATUS] = 'Paid'"),"Fixed")

this fails to work.

Anyone help point out where i have gone wrong?

Thanks in advance.
 
Hi!

Try removing the quotes within the criteria part.

[tt]JAN: Format(DSum("[GROSS]","[tblWorkSheet]","Month([WACTIONDATE]) = '1' And [WSTATUS] = 'Paid'"),"Fixed")[/tt]

Roy-Vidar
 
Thank You Roy

Now works as I wished. Now I can sleep.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top