date error

G

Guest

I have a report which pulls info. onbasis of date range, using hasdata
property I am able to get a null value if there is not data processed within
the date range, however in the header it gives a me a text "error" for the
date range

need have the date range mentioned, at the moment under the control source I
use
="Dated from " & [Type beginning date] & " to " & [Type ending date]

any help will be appreciated

thanks
 
D

Duane Hookom

You can't get the entered dates from parameter prompts if there are no
records returned. Either use the HasData to remove the error or replace all
parameter prompts with references to controls on forms. This would work:

="Between " & [Forms]![frmRptCriteria]![txtStart] & " and " &
[Forms]![frmRptCriteria]![txtEnd]
 
G

Guest

let me try the later, however tried HasData option did not work. In control
source entered =IIf([Report].HasData,Sum([Count]),0)"Dated from " & [Type
beginning date] & " to " & [Type ending date]

thanks
Duane Hookom said:
You can't get the entered dates from parameter prompts if there are no
records returned. Either use the HasData to remove the error or replace all
parameter prompts with references to controls on forms. This would work:

="Between " & [Forms]![frmRptCriteria]![txtStart] & " and " &
[Forms]![frmRptCriteria]![txtEnd]

--
Duane Hookom
MS Access MVP

Gerald said:
I have a report which pulls info. onbasis of date range, using hasdata
property I am able to get a null value if there is not data processed
within
the date range, however in the header it gives a me a text "error" for the
date range

need have the date range mentioned, at the moment under the control source
I
use
="Dated from " & [Type beginning date] & " to " & [Type ending date]

any help will be appreciated

thanks
 
D

Duane Hookom

Your Sum() is correctly configured but you would have to use the same
IIf(HasData...) for your parameter prompts. Don't use parameter prompts.

--
Duane Hookom
MS Access MVP

Gerald said:
let me try the later, however tried HasData option did not work. In
control
source entered =IIf([Report].HasData,Sum([Count]),0)"Dated from " & [Type
beginning date] & " to " & [Type ending date]

thanks
Duane Hookom said:
You can't get the entered dates from parameter prompts if there are no
records returned. Either use the HasData to remove the error or replace
all
parameter prompts with references to controls on forms. This would work:

="Between " & [Forms]![frmRptCriteria]![txtStart] & " and " &
[Forms]![frmRptCriteria]![txtEnd]

--
Duane Hookom
MS Access MVP

Gerald said:
I have a report which pulls info. onbasis of date range, using hasdata
property I am able to get a null value if there is not data processed
within
the date range, however in the header it gives a me a text "error" for
the
date range

need have the date range mentioned, at the moment under the control
source
I
use
="Dated from " & [Type beginning date] & " to " & [Type ending date]

any help will be appreciated

thanks
 

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