Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    USA
    Posts
    21

    Question Unanswered: Report Question. Date Range Display

    Hello All:

    I am trying to display a range of dates I pull from a query for a report. I can get the query to run correctly, but how do I insert what the users inputs as a range into a report? I have added the field that is asking for a range to the report, but all I get is a single date to display.

    IE: Invoice Date: Between [enter starting date] and [enter ending date]
    then I added the fields [invoice date] to the report. It only showes me 1 date, not the range that I entered....

    Any thought on this would be great

    Thanks

    Lakota

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Question Re: Report Question. Date Range Display

    Originally posted by lakota2k
    Hello All:

    I am trying to display a range of dates I pull from a query for a report. I can get the query to run correctly, but how do I insert what the users inputs as a range into a report? I have added the field that is asking for a range to the report, but all I get is a single date to display.

    IE: Invoice Date: Between [enter starting date] and [enter ending date]
    then I added the fields [invoice date] to the report. It only showes me 1 date, not the range that I entered....

    Any thought on this would be great

    Thanks

    Lakota
    Did you put 2 fields on the report for invoice date?

    I would think that if you wanted to display both dates then call them 2 different things in your query and include them in your report. You can label them whatever you want in the report.
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

  3. #3
    Join Date
    Dec 2003
    Location
    USA
    Posts
    21

    Re: Report Question. Date Range Display

    Originally posted by basicmek
    Did you put 2 fields on the report for invoice date?

    I would think that if you wanted to display both dates then call them 2 different things in your query and include them in your report. You can label them whatever you want in the report.
    I thought about that, but was not sure how to get the data that the user enters into the prompt to display in those two fields.

    Any thoughts abou that?

    Lakota

  4. #4
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: Report Question. Date Range Display

    Originally posted by lakota2k
    I thought about that, but was not sure how to get the data that the user enters into the prompt to display in those two fields.

    Any thoughts abou that?

    Lakota
    Sorry I didn't respond earlier. It's a work vs home time thing.

    This may not be the sexiest in the world, and I know there is a better way, but you can create a query and include all of your fields. Create a calculated field for each of the two dates.

    Field One: StartDate: CDate([Enter Start Date])
    Field Two: EndDate: CDate(Enter End Date])

    Create another query and use this query as the source. Include all of your fields again and put criterea in the InvoiceDate field that will restrict to between the StartDate and EndDate fields.

    When you run it, it will prompt you for the values and convert them to dates for you and give you the results you are looking for. You will notice though that the Start and End Dates are repeated for each row so you will probably have to create grouping on your report to get them to display only once.

    Again, this is probably the hard way and could probably be done with an embedded Select statement in the Where clause but my poor brain couldn't get the syntax right.

    This will at least keep you in the Query Design Grid instead of writing freeform SQL if you want to keep it simple.

    Let me know if this is feasible. If not we'll try again.
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

Posting Permissions

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