#Error

T

Tina

I have a report based on a crosstab query. I added a text field to the detail
section of the report that does the following:
=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #1/4/05# And
#31/3/06#]"),"$0.00 ").

I would like the sum of the invoice amount between the dates above. I get
an error when I try and run this?
 
K

Ken Snell [MVP]

Use US format for the dates (m/d/yy):

=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #4/1/05# And
#3/31/06#]"),"$0.00 ").
 
T

Tina

I still get an error

Ken Snell said:
Use US format for the dates (m/d/yy):

=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #4/1/05# And
#3/31/06#]"),"$0.00 ").


--

Ken Snell
<MS ACCESS MVP>

Tina said:
I have a report based on a crosstab query. I added a text field to the
detail
section of the report that does the following:
=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #1/4/05# And
#31/3/06#]"),"$0.00 ").

I would like the sum of the invoice amount between the dates above. I get
an error when I try and run this?
 
K

Ken Snell [MVP]

Sorry... I didn't delete a ] character that was in your original expression:

=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #4/1/05# And
#3/31/06#"),"$0.00 ")

--

Ken Snell
<MS ACCESS MVP>


Tina said:
I still get an error

Ken Snell said:
Use US format for the dates (m/d/yy):

=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #4/1/05#
And
#3/31/06#]"),"$0.00 ").


--

Ken Snell
<MS ACCESS MVP>

Tina said:
I have a report based on a crosstab query. I added a text field to the
detail
section of the report that does the following:
=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #1/4/05#
And
#31/3/06#]"),"$0.00 ").

I would like the sum of the invoice amount between the dates above. I
get
an error when I try and run this?
 
T

Tina

thanks, that worked. But is there a way to specify 2 criteria.

=Nz(DSum("[Allocation_Amt]","qry_allocation_partner_equip","[InvoiceDate]
Between #1/4/06# and #3/31/07# AND "[Partner_ID] = " & [Partner_ID]),"$0.00
")

I've tried only having one of each and they work but when I but both of them
together it just ignores the criteria.

Any ideas why?

Ken Snell said:
Sorry... I didn't delete a ] character that was in your original expression:

=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #4/1/05# And
#3/31/06#"),"$0.00 ")

--

Ken Snell
<MS ACCESS MVP>


Tina said:
I still get an error

Ken Snell said:
Use US format for the dates (m/d/yy):

=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #4/1/05#
And
#3/31/06#]"),"$0.00 ").


--

Ken Snell
<MS ACCESS MVP>

I have a report based on a crosstab query. I added a text field to the
detail
section of the report that does the following:
=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #1/4/05#
And
#31/3/06#]"),"$0.00 ").

I would like the sum of the invoice amount between the dates above. I
get
an error when I try and run this?
 
K

Ken Snell [MVP]

Just need to get the " characters in the right places:

=Nz(DSum("[Allocation_Amt]","qry_allocation_partner_equip","[InvoiceDate]
Between #1/4/06# and #3/31/07# AND [Partner_ID] = " & [Partner_ID]),"$0.00
")

--

Ken Snell
<MS ACCESS MVP>


Tina said:
thanks, that worked. But is there a way to specify 2 criteria.

=Nz(DSum("[Allocation_Amt]","qry_allocation_partner_equip","[InvoiceDate]
Between #1/4/06# and #3/31/07# AND "[Partner_ID] = " &
[Partner_ID]),"$0.00
")

I've tried only having one of each and they work but when I but both of
them
together it just ignores the criteria.

Any ideas why?

Ken Snell said:
Sorry... I didn't delete a ] character that was in your original
expression:

=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #4/1/05#
And
#3/31/06#"),"$0.00 ")

--

Ken Snell
<MS ACCESS MVP>


Tina said:
I still get an error

:

Use US format for the dates (m/d/yy):

=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between #4/1/05#
And
#3/31/06#]"),"$0.00 ").


--

Ken Snell
<MS ACCESS MVP>

I have a report based on a crosstab query. I added a text field to
the
detail
section of the report that does the following:
=Nz(DSum("[InvoiceAmt]","tbl_Invoices","[InvoiceDate] Between
#1/4/05#
And
#31/3/06#]"),"$0.00 ").

I would like the sum of the invoice amount between the dates above.
I
get
an error when I try and run this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top