Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Arlington, Texas, USA
    Posts
    124
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Input Data from Forms (MS Access 2000, sr1a)

    I have a report that that uses a query for the data source, and in the query I use a form (frmDates) to get the Start and End Dates for a Between statement. Is there a way to print these dates in the header of the subsequent report? Thanks.

  2. #2
    4 Star Lounger
    Join Date
    Sep 2004
    Location
    Sacramento, California, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Data from Forms (MS Access 2000, sr1a)

    Hi,

    Try in a text box
    ="From " & [Enter a Start Date] & " to " & [Enter an End Date]
    The prompts from the query are in the square brackets.

    Carla

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Input Data from Forms (MS Access 2000, sr1a)

    You already got two replies. If you want the dates to be displayed in a specific format, you can use the Format function, e.g. in Carla's example:

    ="From " & Format([Enter a Start Date],"ddd mmmm d, yyyy") & " to " & Format([Enter an End Date],"ddd mmmm d, yyyy")

    The "ddd mmmm d, yyyy" format will display dates in the format Sun January 1, 2006. Modify as desired.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Input Data from Forms (MS Access 2000, sr1a)

    You shouldn't include the extra = characters in the control source:

    ="From Date: " & [Forms]![frmDates]![NameOfStartDateField] & " To Date: " & [Forms]![frmDates]![NameOfEndDateField]

  5. #5
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Data from Forms (MS Access 2000, sr1a)

    Thank you Hans for the correction. I know that but over looked it before I sent it.
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

  6. #6
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Schenectady, New York, USA
    Posts
    273
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Input Data from Forms (MS Access 2000, sr1a)

    If your form is still open place a text field in report where you want the dates to display and add the following in the Control Source:

    ="From Date: " & =Forms!frmDates!NameOfStartDateField & " To Date: " & Forms!frmDates!NameOfEndDateField

    Edited to Hans comment in his <!post=reply to this post, 571,880>reply to this post<!/post>
    Don
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18> <img src=/S/flags/NewYork.gif border=0 alt=NewYork width=30 height=18> "Life on Earth is expensive, but at least it includes a free trip around the Sun."

Posting Permissions

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