Results 1 to 5 of 5
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Showing Dates from a query (2000)

    Hi!

    I'm revising a report for a user. Presently the user selects the date range from the report by entering the "from" and "to" dates when prompted by the query. The field containing the date is called [Date Membership Begins]. The SQL in the criteria field is..........
    Between[Please enter the "from" date]And[Please enter the "to" date]. This all works fine. Now the user would like the "from" and "to" dates on the report. Is there any way to do this show both these dates on the report?

    Thanks,
    Leesha

  2. #2
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing Dates from a query (2000)

    Yes, I personally use Global variables and then public functions to return them, when building a query, however, you can include the expressions you prompt the user for in the query fields. ie, if you have [Enter First Date] in the criteria of a field, then you can add a field like this: FirstDatePrompt: [Enter First Date]. The user will only get asked once, as long as the expressions are identical, and then you have a field, just like the rest, which will be what the user entered for the prompt.

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Showing Dates from a query (2000)

    Wow!!! OMG the possiblities. Thank you much!

    Have a good one,
    Leesha

  4. #4
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Showing Dates from a query (2000)

    You're quite welcome. The real thanks goes to a fellow co-worker, who does that kind of thing all the time. I personally only use 'expressions' like that when I'm in a rush, or it's just a quick and dirty project. I prefer to use code when I need to prompt the user for criteria. But the guy that writes most of the querries and reports for our production database, does that expression stuff all the time. (Actually, he picked it up from the query wizard....which puts the expressions in their own field to handle if they are returned as Null or not).

  5. #5
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Showing Dates from a query (2000)

    I tend to do both. It also depnds in how much of a rush I'm in and whether or not the user will need the date info on a report. I'm in the process of adding some stuff to reports in a database that a user now "wants" but had no need for a year ago. Honestly, this approach seems much quicker and easier!! I'm thrilled not to have to go back and redo forms, add code etc. as I want to get this back to them and get on to the next project!

    Thanks again,
    Leesha

Posting Permissions

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