Results 1 to 5 of 5
  1. #1
    JonathanT is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2011
    Posts
    145

    Show Parameter query values in a report

    I have a Parameter query that asks for two dates, a start date and an end date to detrmine the range of dates for the query. The query criteria is this: Between [Statement Start Date] And [Statement End Date]. There is a CuurentDate field that shows all the dates when the query is run. Is there a way to show the manually entered values on a report? So if a user enters [Statement Start Date] as 6/8/2025 and [Statement End Date] as 7/15/2025, I want to show 6/8/2025 and 7/15/2025 on a report.

  2. #2
    Gustav's Avatar
    Gustav is offline Advanced Beginner
    Windows 11 Office 365
    Join Date
    Jan 2025
    Posts
    32
    Add two textboxes for the display and set for these the ControlSource to [Statement Start Date] and [Statement End Date] respectively

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,551
    I would probably create a title that concatenated those two values with some text.

    I do something similar for just one value.

    Code:
    Private Sub Report_Load()
    Me.Auto_Title0.Caption = "Argyle Rd Reunion " & DMax("HistoryYear", "tblHistory") & " NewsLetter"
    End Sub
    Could also just use as a control source.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    In your query, include the start and end dates as part of your select clause, then have two controls in the report header to display them

    select *, startdate,enddate
    from ……
    where currentdate between startdate and enddate

  5. #5
    JonathanT is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2011
    Posts
    145
    Thanks to all who replied. I used Gustav's reply

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

Similar Threads

  1. Replies: 2
    Last Post: 01-26-2017, 08:19 AM
  2. Replies: 5
    Last Post: 08-31-2015, 01:03 PM
  3. Replies: 4
    Last Post: 07-28-2015, 03:34 PM
  4. Replies: 1
    Last Post: 07-21-2015, 03:38 PM
  5. Replies: 3
    Last Post: 07-20-2014, 08:56 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