Number of Days?

L

Laurie

I apologize in advance if this is a duplicate. I posted the question on
Monday but it appears to have not gone through. I have checked all of the
posts and cannot find the solution to my issue.

In my query I have a field named “decisiondate†and I have the criteria set
as Between [BEGIN DATE (mm/dd/yy)?] And [END DATE (mm/dd/yy)?]

In my report I have the control source for “decisiondate†field set as:
="For the period: " & [BEGIN DATE (mm/dd/yy)?] & " thru " & [END DATE
(mm/dd/yy)?]

I have another field named “Approved†with the control source set as:
=Sum([Approved])

I need to have another field in my report for "Average Weekly Approved"
which would be based on the Sum of Approved divided by number of number of
days.

I was trying to use an unbound text box in my report header to count the
number of days using the =datediff ("d",[end date]-[begin date])+1 function.
However it does not work.

HowI do I set up a control box to count the number of days?

Thank you,
 
M

Marshall Barton

Laurie said:
I apologize in advance if this is a duplicate. I posted the question on
Monday but it appears to have not gone through. I have checked all of the
posts and cannot find the solution to my issue.

In my query I have a field named “decisiondate” and I have the criteria set
as Between [BEGIN DATE (mm/dd/yy)?] And [END DATE (mm/dd/yy)?]

In my report I have the control source for “decisiondate” field set as:
="For the period: " & [BEGIN DATE (mm/dd/yy)?] & " thru " & [END DATE
(mm/dd/yy)?]

I have another field named “Approved” with the control source set as:
=Sum([Approved])

I need to have another field in my report for "Average Weekly Approved"
which would be based on the Sum of Approved divided by number of number of
days.

I was trying to use an unbound text box in my report header to count the
number of days using the =datediff ("d",[end date]-[begin date])+1 function.
However it does not work.


The DateDiff should work if you spell the parameter prompts
**exactly** the same as in the query (as you did in the
header).

Note, it's way more productive to tell us what actually
happened instead of just saying "it does not work".
 
M

Marshall Barton

Laurie said:
I apologize in advance if this is a duplicate. I posted the question on
Monday but it appears to have not gone through. I have checked all of the
posts and cannot find the solution to my issue.

In my query I have a field named “decisiondate” and I have the criteria set
as Between [BEGIN DATE (mm/dd/yy)?] And [END DATE (mm/dd/yy)?]

In my report I have the control source for “decisiondate” field set as:
="For the period: " & [BEGIN DATE (mm/dd/yy)?] & " thru " & [END DATE
(mm/dd/yy)?]

I have another field named “Approved” with the control source set as:
=Sum([Approved])

I need to have another field in my report for "Average Weekly Approved"
which would be based on the Sum of Approved divided by number of number of
days.

I was trying to use an unbound text box in my report header to count the
number of days using the =datediff ("d",[end date]-[begin date])+1 function.
However it does not work.


The DateDiff should work if you spell the parameter prompts
**exactly** the same as in the query (as you did in the
header).

Note, it's way more productive to tell us what actually
happened instead of just saying "it does not work".
 
L

Laurie

Thank you very much. Your answer helped, I was using the parameter prompts
as they were written in the report field rather than the query .
--
Laurie


Marshall Barton said:
Laurie said:
I apologize in advance if this is a duplicate. I posted the question on
Monday but it appears to have not gone through. I have checked all of the
posts and cannot find the solution to my issue.

In my query I have a field named “decisiondate†and I have the criteria set
as Between [BEGIN DATE (mm/dd/yy)?] And [END DATE (mm/dd/yy)?]

In my report I have the control source for “decisiondate†field set as:
="For the period: " & [BEGIN DATE (mm/dd/yy)?] & " thru " & [END DATE
(mm/dd/yy)?]

I have another field named “Approved†with the control source set as:
=Sum([Approved])

I need to have another field in my report for "Average Weekly Approved"
which would be based on the Sum of Approved divided by number of number of
days.

I was trying to use an unbound text box in my report header to count the
number of days using the =datediff ("d",[end date]-[begin date])+1 function.
However it does not work.


The DateDiff should work if you spell the parameter prompts
**exactly** the same as in the query (as you did in the
header).

Note, it's way more productive to tell us what actually
happened instead of just saying "it does not work".
 
L

Laurie

Thank you very much. Your answer helped, I was using the parameter prompts
as they were written in the report field rather than the query .
--
Laurie


Marshall Barton said:
Laurie said:
I apologize in advance if this is a duplicate. I posted the question on
Monday but it appears to have not gone through. I have checked all of the
posts and cannot find the solution to my issue.

In my query I have a field named “decisiondate†and I have the criteria set
as Between [BEGIN DATE (mm/dd/yy)?] And [END DATE (mm/dd/yy)?]

In my report I have the control source for “decisiondate†field set as:
="For the period: " & [BEGIN DATE (mm/dd/yy)?] & " thru " & [END DATE
(mm/dd/yy)?]

I have another field named “Approved†with the control source set as:
=Sum([Approved])

I need to have another field in my report for "Average Weekly Approved"
which would be based on the Sum of Approved divided by number of number of
days.

I was trying to use an unbound text box in my report header to count the
number of days using the =datediff ("d",[end date]-[begin date])+1 function.
However it does not work.


The DateDiff should work if you spell the parameter prompts
**exactly** the same as in the query (as you did in the
header).

Note, it's way more productive to tell us what actually
happened instead of just saying "it does not work".
 

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