+ Reply to Thread
Results 1 to 2 of 2

Search between two dates

  1. #1
    Registered User
    Join Date
    06-21-2005
    Posts
    16

    Search between two dates

    Hi everyone

    I've got information in a SQL Server Database. I'm viewing the data using MS Excel, e.g Data, Get External Data, Create New Query (on the toolbar).

    Now using the wizard I have got to Microsoft Query. What I want the system to do is.....

    When I open the spreadsheet a pop up box appears where the user types in the FROM date, then a second pop up box appears where the user types in the TO date. The values that are shown on the spreadsheet are the values between the two dates (including the FROM and TO dates).

    Is this quite easy?

    Thanks for any help

    David

  2. #2
    Forum Contributor
    Join Date
    12-02-2004
    Location
    London
    Posts
    255
    You need a parameter query,

    Once you have connected to your database and selected the table(s). View the Conditions and select the date field as a condition. Then enter the condition with square barckets ([]) This creates a parameter query, when you return the data to Excel, you will need to enter the parameter value, however when in Excel you can set the parameter to refresh the query, when a cell value changes (ie your date)

    Good Luck

    Gary

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1