How to show date range on report

G

Guest

Hello,

I have set up my database to allow the user to enter a date range [start
date] - [end date], and then print a list of records that fall into that time
period. So far, so good.
What I would like to do, however, is have my report show the date range that
was selected on the imput form. Can that be done, and if so, how?

Thank you.
 
R

Rick B

Sure, just add an unbound text box and enter the prompts the same way you
entered them in your query. For example...


="Report rage: " & Format([start date],"Short Date") & " through " &
Format([end date],"Short Date")
 
G

Guest

Thank you.
Unfortunately, it doesn't quite work out. I only get the start date. May
have something to do with the way I have set up the query:

Is Not Null And Between [Forms]![Main]![start date] And [Forms]![Main]![end
date]

Both "start date" and "end date" refer to the same field in the query since
all I want to do is show things that were started in a certain period of time.


Rick B said:
Sure, just add an unbound text box and enter the prompts the same way you
entered them in your query. For example...


="Report rage: " & Format([start date],"Short Date") & " through " &
Format([end date],"Short Date")



--
Rick B



Niniel said:
Hello,

I have set up my database to allow the user to enter a date range [start
date] - [end date], and then print a list of records that fall into that
time
period. So far, so good.
What I would like to do, however, is have my report show the date range
that
was selected on the imput form. Can that be done, and if so, how?

Thank you.
 
G

Guest

All right, I figured it out:

=Forms!Main![start date] & "-" & Forms!Main![end date]

Surprisingly, to me anyway, this works, even though the report wizards won't
touch forms.

Thanks for providing the inspiration, Rick.

Niniel said:
Thank you.
Unfortunately, it doesn't quite work out. I only get the start date. May
have something to do with the way I have set up the query:

Is Not Null And Between [Forms]![Main]![start date] And [Forms]![Main]![end
date]

Both "start date" and "end date" refer to the same field in the query since
all I want to do is show things that were started in a certain period of time.


Rick B said:
Sure, just add an unbound text box and enter the prompts the same way you
entered them in your query. For example...


="Report rage: " & Format([start date],"Short Date") & " through " &
Format([end date],"Short Date")



--
Rick B



Niniel said:
Hello,

I have set up my database to allow the user to enter a date range [start
date] - [end date], and then print a list of records that fall into that
time
period. So far, so good.
What I would like to do, however, is have my report show the date range
that
was selected on the imput form. Can that be done, and if so, how?

Thank you.
 

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