Results 1 to 6 of 6
  1. #1
    BLD21 is offline Advanced Beginner
    Windows 2K Access 2007
    Join Date
    Apr 2011
    Posts
    55

    Between and End Dates on Report

    access 2007,
    I have a report that is using a query as the control source. In my query I have a date field range for start and end dates:

    Between [Enter Start Date as mm/dd/yy] And [Enter End Date as mm/dd/yy]

    How would I display the start and end dates in my report?



    Thanks,
    Bruce D.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,195
    Separately:

    =[Enter Start Date as mm/dd/yy]

    Together:

    ="From " & [Enter Start Date as mm/dd/yy] & " to " & [Enter End Date as mm/dd/yy]

    Either way that's the control source of a textbox. As long as the text exactly matches the text in the query, the user won't be prompted again.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    BLD21 is offline Advanced Beginner
    Windows 2K Access 2007
    Join Date
    Apr 2011
    Posts
    55
    Yes, this will do the job. Thanks!
    One more thing, would there be a way to set some type of date validation either in the query or in the report field. I need the format of mm/dd/yy only. If null or any other fromat I will need a message box.

    Thanks again!!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,195
    That's one reason most of us use forms to gather user input. You have much more control and the ability to validate before running the report. Using the brackets method you don't really have any control.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    cap.zadi is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2011
    Location
    KSA
    Posts
    480
    Gentleman,

    I have generated some reports but not able to control data. like my reports include data of:

    color, dated,qtysparay

    and sorted report by color and can be by date but how i can control to display only required color or the date range for report? so can have required data not all old data too.

    plz advise

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    21,195
    I'm not sure the question is clear. Basically you control what shows up on a report by basing it on a parameter query or using a technique like this:

    BaldyWeb wherecondition
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. How To Print Calculated Dates on Report
    By ChrisCione in forum Reports
    Replies: 2
    Last Post: 01-15-2011, 03:26 PM
  2. Between Dates Report Problem
    By aamer in forum Access
    Replies: 4
    Last Post: 12-02-2010, 01:00 PM
  3. Filtering Report with between dates
    By patrickmcdiver in forum Reports
    Replies: 3
    Last Post: 02-22-2010, 12:11 PM
  4. Need report to show dates
    By Brian62 in forum Reports
    Replies: 2
    Last Post: 11-20-2009, 12:05 PM
  5. Replies: 5
    Last Post: 09-16-2009, 05:22 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 - Senior Forums