Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520

    Unanswered: Pass a date to a form

    I have a form in Access 2000 that pulls its data from a query named Misd the query asks the user for a date range to query. Hence, when the report is ran it asks for the date range.
    What I would like to do is to have the the report header include the date ranges input by the user. So it says "Data for the dates of 1/1/04 through 1/30/04" or the like.
    I tried a min/max however that only gave the the date ranges of the matching records. (of course) I realized this after trying (Blush)
    Here is the portion of the code that asks for the date range...

    FROM stats
    WHERE (((stats.Date) Between [Please enter the beginning date] And [Please enter the ending date])


    (I know the Parenthesis look wrong but there is another criteria after the date.)

    I hope this information is complete enough .

    Thanks

    Darasen

  2. #2
    Join Date
    Jun 2004
    Posts
    92
    In your report make two text boxes. Put the following as their control sources:

    =[Please enter the beginning date]

    and

    =[Please enter the ending date]

  3. #3
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    I am such a Dork !
    Thanks !

  4. #4
    Join Date
    Aug 2003
    Location
    Cleveland USA
    Posts
    184
    You can also make your report header a text box instead of a label:

    = "Records for " & [Please Enter the Beginning Date] & " through " & [Please Enter theEnding Date]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •