Results 1 to 5 of 5
  1. #1
    djfuego is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Location
    UK
    Posts
    13

    Adding date parameters into report

    I'm trying to get my head around adding from and to date parameters into the report so when I enter from date XX/XX/XXXX to date YY/YY/YYYY I want those values to be inserted into the report view and then into the XLS export file as well.
    How can this be done?



    Click image for larger version. 

Name:	param1.PNG 
Views:	15 
Size:	14.3 KB 
ID:	7799Click image for larger version. 

Name:	param2.PNG 
Views:	15 
Size:	15.5 KB 
ID:	7798Click image for larger version. 

Name:	param3.png 
Views:	3 
Size:	76.1 KB 
ID:	7797Click image for larger version. 

Name:	param4.png 
Views:	4 
Size:	112.8 KB 
ID:	7796
    Last edited by djfuego; 05-25-2012 at 07:59 AM. Reason: Added images Final Image is a mock-up

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    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.

  3. #3
    djfuego is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2011
    Location
    UK
    Posts
    13

    Reference text boxes with query?

    Quote Originally Posted by jzwp11 View Post
    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.

  4. #4
    alansidman's Avatar
    alansidman is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    This should help you. Watch this video

    http://www.datapigtechnologies.com/f...mtoreport.html

    Alan

  5. #5
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    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.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 03-07-2012, 09:00 AM
  2. Date Parameters
    By pj13 in forum Reports
    Replies: 2
    Last Post: 02-01-2012, 01:12 PM
  3. Replies: 32
    Last Post: 06-20-2011, 07:30 PM
  4. Enter Wildcards for Date Parameters
    By P5C768 in forum Queries
    Replies: 3
    Last Post: 05-18-2011, 01:42 PM
  5. Replies: 1
    Last Post: 03-05-2011, 03:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums