Alter query for report?

  • Thread starter ispfemme via AccessMonster.com
  • Start date
I

ispfemme via AccessMonster.com

I have created a database that pulls a text file into a table, cleans it out,
and then displays in a report with appended comments that my users can alter.
Now I have a user request for the option of selecting how many days out worth
of data they want the report to display. I have a query pulling the main
table in with the address and supplier names being pulled from other tables.
That's where I have the report generating from. I know that under the date
field (which is already in the date/time format) I use the line :

<=Date()+"*"

with the * representing any number of days out I want to be displayed. How
can I have a user select the amount of days they want the report to display
without having to create so many individual queries and reports? I was
thinking about a drop down list for just selecting the number of days and try
to use a variable in place of the * in the above command. I'm just having
trouble figuring out what to do to get the right input in for what they need
to view.

Any and all help is greatly appreciated.
 
M

Marshall Barton

ispfemme said:
I have created a database that pulls a text file into a table, cleans it out,
and then displays in a report with appended comments that my users can alter.
Now I have a user request for the option of selecting how many days out worth
of data they want the report to display. I have a query pulling the main
table in with the address and supplier names being pulled from other tables.
That's where I have the report generating from. I know that under the date
field (which is already in the date/time format) I use the line :

<=Date()+"*"

with the * representing any number of days out I want to be displayed. How
can I have a user select the amount of days they want the report to display
without having to create so many individual queries and reports? I was
thinking about a drop down list for just selecting the number of days and try
to use a variable in place of the * in the above command. I'm just having
trouble figuring out what to do to get the right input in for what they need
to view.


Try using the criteria:
DateAdd("d", -[Enter number of days], Date())
 

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