Query input parameters inputted onto a report

lbradbury

New Member
Joined
May 14, 2020
Messages
46
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a report that is generated based off a of a query of inputted parameters with a start and end date to query records. I'd like the inputted parameters to appear on the report to show the user what they have set for the start/end dates.

Thanks,
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Are you using a Parameter Query? If so, I think it may be difficult to do that.
Instead, create a Selection Form where you enter that criteria, and have those two entries bound to a one-record table (that stores the last inputted values).
Then you could reference the values from that Table on the Report.
 
Upvote 0
If I understand you correctly, you could do something like this, then refer to sDate and Edate in your report.
The StartDate and EndDate are input when the query runs?

Code:
SELECT Transactions.*, Transactions.TRansactionDate AS TransactionDate1, Transactions.TransactionDate, [StartDate] AS SDatte, [EndDate] AS EDate
FROM Transactions
WHERE (((Transactions.TRansactionDate)>=[StartDate]) AND ((Transactions.TransactionDate)<=[EndDate]));

You of course choose your fields, I just selected all in my test. Could also use Between?

Code:
SELECT Transactions.*, Transactions.TRansactionDate AS TransactionDate1, [StartDate] AS SDatte, [EndDate] AS EDate
FROM Transactions
WHERE (((Transactions.TRansactionDate) Between [StartDate] And [EndDate]));
HTH
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top