Can a DSum utilize criteria outside the named domain

D

dvlander

If I am using a DSum in a report, can I use criteria from a calculated field
on the report itself?

For example, suppose I pull a sum of cost data from the named domain by a
date range and I would like to additionally restrict it to the exact Job
Number on the specific record on the report.

Is this possible? Any other suggestions?

Thx, Dale
 
J

Jeff Boyce

What happens when you try it?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

dvlander

It appears to ignore it. Here is the syntax:

=DSum("[inInvoiceAmount]","tblVendorInvoices","[inInvoiceDate] <=
#7/31/09#" And "[inAssignmentID] = [AssignmentID]")

AssignmentID is the control on my report.

Thx, Dale
 
F

fredg

It appears to ignore it. Here is the syntax:

=DSum("[inInvoiceAmount]","tblVendorInvoices","[inInvoiceDate] <=
#7/31/09#" And "[inAssignmentID] = [AssignmentID]")

AssignmentID is the control on my report.

Thx, Dale

Jeff Boyce said:
What happens when you try it?

Regards

Jeff Boyce
Microsoft Office/Access MVP

For one thing, this part of your syntax is incorrect.
V V
"[inInvoiceDate] <= #7/31/09#" And "[inAssignmentID] =
[AssignmentID]")

You have superflouous quotes after the # and before [AssignmentID].

Try:
"[inInvoiceDate] <= #7/31/09# And [inAssignmentID] =
[AssignmentID]")
 
D

dvlander

Fred:

That solved it, thanks much for the assistance.

Dale

fredg said:
It appears to ignore it. Here is the syntax:

=DSum("[inInvoiceAmount]","tblVendorInvoices","[inInvoiceDate] <=
#7/31/09#" And "[inAssignmentID] = [AssignmentID]")

AssignmentID is the control on my report.

Thx, Dale

Jeff Boyce said:
What happens when you try it?

Regards

Jeff Boyce
Microsoft Office/Access MVP

If I am using a DSum in a report, can I use criteria from a calculated
field
on the report itself?

For example, suppose I pull a sum of cost data from the named domain by a
date range and I would like to additionally restrict it to the exact Job
Number on the specific record on the report.

Is this possible? Any other suggestions?

Thx, Dale

For one thing, this part of your syntax is incorrect.
V V
"[inInvoiceDate] <= #7/31/09#" And "[inAssignmentID] =
[AssignmentID]")

You have superflouous quotes after the # and before [AssignmentID].

Try:
"[inInvoiceDate] <= #7/31/09# And [inAssignmentID] =
[AssignmentID]")
 

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

Similar Threads


Top