• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 50
  • Last Modified:

Access Report - Problem adding a date selector

Hi

I have ab Access report on which I am trying to add a text box with a date selector.
This works fine on forms but not on reports.
Is this possible? If not, is there another way for the user to select a date?

Thanks
0
Murray Brown
Asked:
Murray Brown
2 Solutions
 
PatHartmanCommented:
Put the date selector on a form so that it can be passed using the where argument of the OpenReport method.  An alternative is to prompt for a date.  I don't like that method because you can't give the user a calendar control or validate the date.

If you must do this on the report - i don't recommend it - you must use Report View rather than Print Preview.  Controls are "live" in Report View.  However, you don't get page breaks or the ability to run code in those breaks.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
<<Is this possible? If not, is there another way for the user to select a date?>>

  Yes it's possible, but what you'd typically do is use a form to gather any input, then call the report from the form.

  When you call the report, you can pass a filter or a WHERE clause on the openreport statement.  Filter would be the simplest.

  I can give you an example of that if you want.

Jim.
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now