Last edited by djfuego; 05-25-2012 at 07:59 AM. Reason: Added images Final Image is a mock-up
I would use an unbound form with two textbox controls (for the dates). You can then reference those form controls in controls in your report. You can also reference those same form controls in the query behind the report.
OK the query is linked to a table how do I add links to these text boxes? I just want to put the dates from and to in the xls export. At the moment the xl file displays the text box names and not the dates although the report display is showing what I want the xls file to look like. they are in the header area. But I don't want them repeating every single line down the spreadsheet.
This should help you. Watch this video
http://www.datapigtechnologies.com/f...mtoreport.html
Alan
You can reference the dates by putting the date parameters in the SELECT clause of the query but that will include the two dates for EACH record in the query which you say you do not want in the final export to Excel. The only way to add a header with the dates independently of the data from the query is to use Visual Basic for Application (VBA) code from within Access to push the values to the spreadsheet.