By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,404 Members | 1,873 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,404 IT Pros & Developers. It's quick & easy.

Store Value of Input For a Report

100+
P: 132
Hello All,

I have a report that allows the user the ability to find all orders that are over a certain days old. It is up to the user to determine how many days back they want to go. (It is a input parameter to the query). How can I capture their input and then use that value in the HEADER of a report....SO, if they were to input 45, the report header would read "Orders 45 Days Old"
Feb 12 '08 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
Hello All,

I have a report that allows the user the ability to find all orders that are over a certain days old. It is up to the user to determine how many days back they want to go. (It is a input parameter to the query). How can I capture their input and then use that value in the HEADER of a report....SO, if they were to input 45, the report header would read "Orders 45 Days Old"
You need to make a parameter declaration at the beginning of the query. For example ...

PARAMETERS [NumDays] Long;
SELECT DateField, OtherField
FROM TableName
WHERE (((DateField)<=Now()-[NumDays]));

Now to refer to it on the form just use an unbound textbox and set control source to ...

=[NumDays]
Feb 12 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.