Results 1 to 11 of 11
  1. #1
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67

    Date Parameter to be displayed in report


    I am using date parameter to generate report. Is it possible to display date parameter in report ? For e.g. This report is "from date: to to date:"

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    How do you pass the date parameter to generate report ?

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Use a textbox on form to enter the date value, then options:

    1. pass the date parameter to report with OpenArgs argument of OpenReport
    DoCmd.OpenReport "report name", , , , , , Me.textboxname

    2. in ControlSource of textbox on report, reference the form textbox
    =Forms!formname!textboxname
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    I am passing parameter it through queries

  5. #5
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    Quote Originally Posted by June7 View Post
    Use a textbox on form to enter the date value, then options:

    1. pass the date parameter to report with OpenArgs argument of OpenReport
    DoCmd.OpenReport "report name", , , , , , Me.textboxname

    2. in ControlSource of textbox on report, reference the form textbox
    =Forms!formname!textboxname

    The problem with text box is that i will have two data parameters one coming from queries and another coming from text box.
    Is there any other way with which the data parameters which i am using from queries will also show up on report ?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What do you mean by 'coming from query' - a popup input parameter? I never use popup inputs in query. Can't validate input and if it is in the criteria row, it is not available for further reference. Actually, I don't use dynamic parameters in queries at all. I use forms to input parameters and then pass the parameters to report with WHERE CONDITION, like:

    DoCmd.OpenReport "report name", , , "ID=" & Me.ID, , Me.datetextbox
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    Quote Originally Posted by June7 View Post
    What do you mean by 'coming from query' - a popup input parameter? I never use popup inputs in query. Can't validate input and if it is in the criteria row, it is not available for further reference. Actually, I don't use dynamic parameters in queries at all. I use forms to input parameters and then pass the parameters to report with WHERE CONDITION, like:

    DoCmd.OpenReport "report name", , , "ID=" & Me.ID, , Me.datetextbox

    Well in my case the project that i am working on requires to pull up report using date range and same date range need to be showed on report. I am using form just for entry purposes. What are my options ?

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I think the options are already described. What specifically do you not understand?

    Review:

    http://www.allenbrowne.com/ser-62code.html

    http://www.datapigtechnologies.com/f...mtoreport.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    Quote Originally Posted by June7 View Post
    I think the options are already described. What specifically do you not understand?

    Review:

    http://www.allenbrowne.com/ser-62code.html

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

    I will post the outcome let me follow the video....it seem very interesting and helpful

  10. #10
    smarty84handsome is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    67
    Quote Originally Posted by smarty84handsome View Post
    I will post the outcome let me follow the video....it seem very interesting and helpful
    I was able to solve the issue and i did it the way you recommended me thanx for the great help.

  11. #11
    phivosz is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Jan 2014
    Posts
    17
    My preferred way is to write the value to a table and then read it with the "on open" event of the report.

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

Similar Threads

  1. Replies: 4
    Last Post: 03-06-2013, 04:59 AM
  2. Query Parameter Displayed on Report
    By hinoks in forum Reports
    Replies: 3
    Last Post: 02-17-2012, 01:56 PM
  3. Getting report to be displayed in front of Menu?
    By newtoAccess in forum Forms
    Replies: 3
    Last Post: 12-28-2010, 11:06 AM
  4. Limiting the results displayed in a report
    By musicalogist in forum Reports
    Replies: 1
    Last Post: 06-10-2010, 04:44 PM
  5. Replies: 0
    Last Post: 03-24-2010, 12:51 AM

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