A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date Parameter on Report



 
 
Thread Tools Display Modes
  #1  
Old July 30th, 2007, 11:42 PM posted to microsoft.public.access.reports
Kathy
external usenet poster
 
Posts: 641
Default Date Parameter on Report

Hello...I am using the code below to show a date parameter on a report. The
parameters are entered via a form...frmStaffFollowUp. It works well, except I
am trying to make a small change to no avail. When there are No Records
Found, I would still like the date parameter to show...something like "No
Records Found for 1/1/2007 - 2/1/2007". I am a novice and so far eveything
that I have stabbed at has returned #Error. Any help is greatly appreciated.


=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " & "
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found")
--
Kbelo
  #2  
Old July 31st, 2007, 01:11 AM posted to microsoft.public.access.reports
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Date Parameter on Report

Perhaps this:

=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " & "
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found for " &
[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " & "
" & [Forms!frmStaffFollowUp!txtEndDate])

--

Ken Snell
MS ACCESS MVP




"Kathy" wrote in message
...
Hello...I am using the code below to show a date parameter on a report.
The
parameters are entered via a form...frmStaffFollowUp. It works well,
except I
am trying to make a small change to no avail. When there are No Records
Found, I would still like the date parameter to show...something like "No
Records Found for 1/1/2007 - 2/1/2007". I am a novice and so far eveything
that I have stabbed at has returned #Error. Any help is greatly
appreciated.


=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " &
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found")
--
Kbelo



  #3  
Old August 1st, 2007, 11:52 PM posted to microsoft.public.access.reports
Kathy
external usenet poster
 
Posts: 641
Default Date Parameter on Report

Thank you for your reply...your suggestion looks like it should completely
solve the problem, but I am still receiving #Error when there are no records
found. (If there are records, then the date parameter returns accurately.)
Thus I double-checked everything, but still got the same result when there
are no records. So I separated into two text boxes. One is a text box which
displays the parameter dates...no IIF statement involved. Then another text
box directly underneath displays the following:

IIf(Report.HasData, " ", "No Records Found").

This arrangement is working, but just frustrating as it should work as you
suggested in your reply. If you have any other thoughts, I would appreciate
hearing from you.
Thanks again.


--
Kbelo


"Ken Snell (MVP)" wrote:

Perhaps this:

=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " & "
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found for " &
[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " & "
" & [Forms!frmStaffFollowUp!txtEndDate])

--

Ken Snell
MS ACCESS MVP




"Kathy" wrote in message
...
Hello...I am using the code below to show a date parameter on a report.
The
parameters are entered via a form...frmStaffFollowUp. It works well,
except I
am trying to make a small change to no avail. When there are No Records
Found, I would still like the date parameter to show...something like "No
Records Found for 1/1/2007 - 2/1/2007". I am a novice and so far eveything
that I have stabbed at has returned #Error. Any help is greatly
appreciated.


=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " &
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found")
--
Kbelo




  #4  
Old August 2nd, 2007, 12:44 AM posted to microsoft.public.access.reports
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Date Parameter on Report

Hmm... strange result. In which section of the report is the textbox
located -- the one that you want to display the info per the solution that
I'd posted?

--

Ken Snell
MS ACCESS MVP


"Kathy" wrote in message
...
Thank you for your reply...your suggestion looks like it should completely
solve the problem, but I am still receiving #Error when there are no
records
found. (If there are records, then the date parameter returns accurately.)
Thus I double-checked everything, but still got the same result when there
are no records. So I separated into two text boxes. One is a text box
which
displays the parameter dates...no IIF statement involved. Then another
text
box directly underneath displays the following:

IIf(Report.HasData, " ", "No Records Found").

This arrangement is working, but just frustrating as it should work as you
suggested in your reply. If you have any other thoughts, I would
appreciate
hearing from you.
Thanks again.


--
Kbelo


"Ken Snell (MVP)" wrote:

Perhaps this:

=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " &
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found for " &
[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " & "
" & [Forms!frmStaffFollowUp!txtEndDate])

--

Ken Snell
MS ACCESS MVP




"Kathy" wrote in message
...
Hello...I am using the code below to show a date parameter on a report.
The
parameters are entered via a form...frmStaffFollowUp. It works well,
except I
am trying to make a small change to no avail. When there are No Records
Found, I would still like the date parameter to show...something like
"No
Records Found for 1/1/2007 - 2/1/2007". I am a novice and so far
eveything
that I have stabbed at has returned #Error. Any help is greatly
appreciated.


=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " - "
&
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found")
--
Kbelo






  #5  
Old August 2nd, 2007, 10:02 PM posted to microsoft.public.access.reports
Kathy
external usenet poster
 
Posts: 641
Default Date Parameter on Report

Hello again...the textbox is in the header section of the report. When I used
your code there, it worked if there were records or if I removed the second
reference to the date parameter and just had "No Records Found"...then it
would work too. Just seemed like it glitched on the second date reference and
thus would not return: No Records found for 1/1/2000 - 1/1/2001 (as example).
I even tried to build another TestReport to see if there was something in my
current report that could cause the glitch...but I had the same error.
Logically, your suggestion should work, but just not happening. Again I
appreciate your help. (I can live with this result, if it looks like we have
reached an impasse, but still willing to try other suggestions.)
--
Kbelo


"Ken Snell (MVP)" wrote:

Hmm... strange result. In which section of the report is the textbox
located -- the one that you want to display the info per the solution that
I'd posted?

--

Ken Snell
MS ACCESS MVP


"Kathy" wrote in message
...
Thank you for your reply...your suggestion looks like it should completely
solve the problem, but I am still receiving #Error when there are no
records
found. (If there are records, then the date parameter returns accurately.)
Thus I double-checked everything, but still got the same result when there
are no records. So I separated into two text boxes. One is a text box
which
displays the parameter dates...no IIF statement involved. Then another
text
box directly underneath displays the following:

IIf(Report.HasData, " ", "No Records Found").

This arrangement is working, but just frustrating as it should work as you
suggested in your reply. If you have any other thoughts, I would
appreciate
hearing from you.
Thanks again.


--
Kbelo


"Ken Snell (MVP)" wrote:

Perhaps this:

=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " &
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found for " &
[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " & "
" & [Forms!frmStaffFollowUp!txtEndDate])

--

Ken Snell
MS ACCESS MVP




"Kathy" wrote in message
...
Hello...I am using the code below to show a date parameter on a report.
The
parameters are entered via a form...frmStaffFollowUp. It works well,
except I
am trying to make a small change to no avail. When there are No Records
Found, I would still like the date parameter to show...something like
"No
Records Found for 1/1/2007 - 2/1/2007". I am a novice and so far
eveything
that I have stabbed at has returned #Error. Any help is greatly
appreciated.


=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " - "
&
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found")
--
Kbelo






  #6  
Old August 3rd, 2007, 12:41 AM posted to microsoft.public.access.reports
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Date Parameter on Report

I've tested the IIf expression with the textbox in the report header section
or in the page header section. Both locations work without giving me an
#Error in that textbox.

I do note a syntax error in your IIf expression, now that I study it more
carefully. Try it this way (without the [ ] characters around the reference
to the form's controls):

=IIf(Report.HasData,Forms!frmStaffFollowUp!txtStar tDate & " " & " - " & "
" & Forms!frmStaffFollowUp!txtEndDate,"No Records Found for " &
Forms!frmStaffFollowUp!txtStartDate & " " & " - " & "
" & Forms!frmStaffFollowUp!txtEndDate)

--

Ken Snell
MS ACCESS MVP



"Kathy" wrote in message
...
Hello again...the textbox is in the header section of the report. When I
used
your code there, it worked if there were records or if I removed the
second
reference to the date parameter and just had "No Records Found"...then it
would work too. Just seemed like it glitched on the second date reference
and
thus would not return: No Records found for 1/1/2000 - 1/1/2001 (as
example).
I even tried to build another TestReport to see if there was something in
my
current report that could cause the glitch...but I had the same error.
Logically, your suggestion should work, but just not happening. Again I
appreciate your help. (I can live with this result, if it looks like we
have
reached an impasse, but still willing to try other suggestions.)
--
Kbelo


"Ken Snell (MVP)" wrote:

Hmm... strange result. In which section of the report is the textbox
located -- the one that you want to display the info per the solution
that
I'd posted?

--

Ken Snell
MS ACCESS MVP


"Kathy" wrote in message
...
Thank you for your reply...your suggestion looks like it should
completely
solve the problem, but I am still receiving #Error when there are no
records
found. (If there are records, then the date parameter returns
accurately.)
Thus I double-checked everything, but still got the same result when
there
are no records. So I separated into two text boxes. One is a text box
which
displays the parameter dates...no IIF statement involved. Then another
text
box directly underneath displays the following:

IIf(Report.HasData, " ", "No Records Found").

This arrangement is working, but just frustrating as it should work as
you
suggested in your reply. If you have any other thoughts, I would
appreciate
hearing from you.
Thanks again.


--
Kbelo


"Ken Snell (MVP)" wrote:

Perhaps this:

=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " -
" &
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found for " &
[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " & "
" & [Forms!frmStaffFollowUp!txtEndDate])

--

Ken Snell
MS ACCESS MVP




"Kathy" wrote in message
...
Hello...I am using the code below to show a date parameter on a
report.
The
parameters are entered via a form...frmStaffFollowUp. It works well,
except I
am trying to make a small change to no avail. When there are No
Records
Found, I would still like the date parameter to show...something
like
"No
Records Found for 1/1/2007 - 2/1/2007". I am a novice and so far
eveything
that I have stabbed at has returned #Error. Any help is greatly
appreciated.


=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " &
" - "
&
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found")
--
Kbelo








  #7  
Old August 3rd, 2007, 04:26 PM posted to microsoft.public.access.reports
Kathy
external usenet poster
 
Posts: 641
Default Date Parameter on Report

It worked beautifully!...thank you for your patience and staying with me
through this problem.
--
Kbelo


"Ken Snell (MVP)" wrote:

I've tested the IIf expression with the textbox in the report header section
or in the page header section. Both locations work without giving me an
#Error in that textbox.

I do note a syntax error in your IIf expression, now that I study it more
carefully. Try it this way (without the [ ] characters around the reference
to the form's controls):

=IIf(Report.HasData,Forms!frmStaffFollowUp!txtStar tDate & " " & " - " & "
" & Forms!frmStaffFollowUp!txtEndDate,"No Records Found for " &
Forms!frmStaffFollowUp!txtStartDate & " " & " - " & "
" & Forms!frmStaffFollowUp!txtEndDate)

--

Ken Snell
MS ACCESS MVP



"Kathy" wrote in message
...
Hello again...the textbox is in the header section of the report. When I
used
your code there, it worked if there were records or if I removed the
second
reference to the date parameter and just had "No Records Found"...then it
would work too. Just seemed like it glitched on the second date reference
and
thus would not return: No Records found for 1/1/2000 - 1/1/2001 (as
example).
I even tried to build another TestReport to see if there was something in
my
current report that could cause the glitch...but I had the same error.
Logically, your suggestion should work, but just not happening. Again I
appreciate your help. (I can live with this result, if it looks like we
have
reached an impasse, but still willing to try other suggestions.)
--
Kbelo


"Ken Snell (MVP)" wrote:

Hmm... strange result. In which section of the report is the textbox
located -- the one that you want to display the info per the solution
that
I'd posted?

--

Ken Snell
MS ACCESS MVP


"Kathy" wrote in message
...
Thank you for your reply...your suggestion looks like it should
completely
solve the problem, but I am still receiving #Error when there are no
records
found. (If there are records, then the date parameter returns
accurately.)
Thus I double-checked everything, but still got the same result when
there
are no records. So I separated into two text boxes. One is a text box
which
displays the parameter dates...no IIF statement involved. Then another
text
box directly underneath displays the following:

IIf(Report.HasData, " ", "No Records Found").

This arrangement is working, but just frustrating as it should work as
you
suggested in your reply. If you have any other thoughts, I would
appreciate
hearing from you.
Thanks again.


--
Kbelo


"Ken Snell (MVP)" wrote:

Perhaps this:

=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " & " -
" &
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found for " &
[Forms!frmStaffFollowUp!txtStartDate] & " " & " - " & "
" & [Forms!frmStaffFollowUp!txtEndDate])

--

Ken Snell
MS ACCESS MVP




"Kathy" wrote in message
...
Hello...I am using the code below to show a date parameter on a
report.
The
parameters are entered via a form...frmStaffFollowUp. It works well,
except I
am trying to make a small change to no avail. When there are No
Records
Found, I would still like the date parameter to show...something
like
"No
Records Found for 1/1/2007 - 2/1/2007". I am a novice and so far
eveything
that I have stabbed at has returned #Error. Any help is greatly
appreciated.


=IIf(Report.HasData,[Forms!frmStaffFollowUp!txtStartDate] & " " &
" - "
&
"
" & [Forms!frmStaffFollowUp!txtEndDate],"No Records Found")
--
Kbelo









  #8  
Old August 3rd, 2007, 08:00 PM posted to microsoft.public.access.reports
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default Date Parameter on Report

You're welcome.

--

Ken Snell
MS ACCESS MVP


"Kathy" wrote in message
...
It worked beautifully!...thank you for your patience and staying with me
through this problem.
--
Kbelo



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:25 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.