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


-- 
David494
------------------------------------------------------------------------
David494's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24482
View this thread: http://www.excelforum.com/showthread.php?threadid=380822

0
6/21/2005 11:05:42 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
282 Views

Similar Articles

[PageSpeed] 49

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


-- 
Gary Brown
------------------------------------------------------------------------
Gary Brown's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=17084
View this thread: http://www.excelforum.com/showthread.php?threadid=380822

0
6/21/2005 12:46:31 PM
Reply:

Similar Artilces:

Can I change the calendar year beginning date?
Our fiscal year runs July 1 thru June 30 of each year. I need to track attendance, gas cards, etc for monthly reports. I have a HUGE table with a gazillion queries and reports for each one. I need one report to reflect quarterly output for our fiscal year as stated above. Can I make this report do that? Thank you! Create a query to use as the source for your report. In query design, type this into the Field row: FinYear: DateAdd("m", -6, [InvoiceDate]) replacing InvoiceDate with the name of your date field. This yields 2007 for all dates in the 2007/2008 financial year...

Date Formatting when Concantenating
I have a simple question. I have a cell that has date that looks lik this: 10/15/1999 14:34 When I use the concantenate feature my date looks like this: 36448.6073611111 I tried to format the call every which way - but I cannot get it t look the original. Feeling really silly for even asking.. thanks all for your help -- Message posted from http://www.ExcelForum.com Hi bleu808! Use: ="Today is "&TEXT(TODAY(),"mm/dd/yyyy hh:mm") -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au "bleu808 >" <<bleu808.189yij...

Show a date 30 days out
I have a feild that I would like to show what the date would be in 30 days for a feild with a date in it [Sold Date]. Sold Date feild would be 1 Jan 07 so the feild would show 30 Days later 31 Jan 07. I did =[Sold date]+30 and it did not work Thanks how about dateadd: dateadd("d", 30, [Sold Date]) -- steve. "KAnoe" <KAnoe@discussions.microsoft.com> wrote in message news:DE9BDDAE-5C84-4A52-8185-DAB6C3167E7A@microsoft.com... >I have a feild that I would like to show what the date would be in 30 days > for a feild with a date in it [Sold Date]. > ...

How OMPM Scanner (offscan) Filter by Access/Modified Date ?
Hello, I have problem to inventory excel files on very big file server, but I believe there are so many documents we no longer need to maintain. I want to skip files if the access date or modified date longer than 6 month, but don't see the OMPM providing feature about it. I currently running OMPM since 2 weeks ago and running out of time for reporting to my manager. Please help me, this is my critical assignment. -- Eldi Munggaran ...

Dates in fomula showing as whole number
I have a fomula in a cell that takes the name of a person (from cell 2B), their License number (from another cell 2C)and the Date that License Expires (From cell 2D). The expire date in "2D" is either the word "none" or a date that that persons license needs to be renewed. Those instructors with "None" come out in the calculated field fine, however the ones with dates come back as whole numbers, Example 8/6/10 shows 40396. any help will be appreciated Hi, You need to change the format of that cell or column, highlight the cell or the column, right click o...

Line Chart with dates in 5 day working week only
Hi, Trying to format a chart so that only the 5 working days of the week are displayed on the x axis. The source data only has the five days (e.g. 05/09/2005 down to 09/09/2005 and then on to 12/09/2005 down to 16/09/2005 etc etc) So I have missed out the weekend dates. When I create the line chart however, the weekend dates appear automatically and just show no point on the chart, therefore there is a longer line between Fridays and Mondays!! Hope this makes sense. Does anyone have any ideas on how to change this? I have tried looking at Tools-options-chart and cannot seem to turn...

How to get only the year in the date format in Access
How to get only the year in the date format I.e in the table in need to display only year E.g 2005 - should be display " 05" automatically Custom format the cell as: yy -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "yanu" <yanu@discussions.microsoft.com> wrote in message news:14CE9F60-F7B9-467A-8C16-71088C31BEBA@microsoft.com... > How to get only the year in the date form...

date/time formatting
I download a csv report from a web based program. Everything works great but the date comes through as "Jul 21 2009 1:51pm". I do not need the time in my report. I have tried reformatting the cells, tried to copy to a new file with the cells already formatted to "7/21/09", opening the cell format using the F2 key and deleting the time (time will still not be formatted correctly). The only way I get get just the time is to retype every cell. What am I doing wrong? I am using Excel 2002 SP3 TIA, Cindy When data is downloaded from the web, a lot of "other&quo...

Same Table cannot be the child table in two nexted relations...
I've been setting up a schema with the XML Designer in VS .NET 2003. The designer lets me set up a lot of things including a complex type that contains an unnamed complex type called modified. When I try to preview the dataset, I get an error described as "The same table (modified) cannot be the child table in two nested relations. I've run into this before with a different complex type, and I've changed the name of the instance of the type in the various elements it's used, and the problem goes away. In this case, problem is an unnamed complex type, so it only a...

Copy/paste range of rows between 2 dates...
Hi! I have a sheet called data which act as a database. The column A has the dates. In order to create customized chart in a userform, for different range of data(i.e from column D, G and M...), I'd like to select a range of rows that are between 2 dates and create the charts accordingly. Or copy to range to another sheet and then create the charts. I am not so advanced in VBA and any help would be greatly appreciated. Thanks! Greg ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Business Software Galore! Free Excel Forum http://www.ozgrid.com/forum *** Hi ...

ComboBox with AutoCompleteMode = SuggestAppend and custom search (Contains)?
Hi, I have a class FlightStation with a Search property that combines two attributes. I like to search not only for matching strings from the beginning, but rather from any where in the string. (With the Contains method or the string class) What is the best and quickest solution to implement such a search when using a combobox and not a TextBox for the input? I know about implementing a derived class like this: class FlightStationBindingList : BindingList<FlightStation> { // ... } But is there a more quick and dirty solution ?! - Sorry :-) My solution with the Tex...

Calculating dates #3
Can anyone tell me what I should use (in the way of helper cells) to take any date (mm/dd/yyyy) and turn it into that same month and day for specific year? For instance, turn... 10/12/2009 into 10/12/2010 and 4/6/1998 into 4/6/2010 I'm trying to determine anniversary date based on start date and do it starting in 2010. TIA -- Jordon Try this: =3DDATE(2010,MONTH(A1),DAY(A1)) Assuming your date is in A1. Hope this helps. Pete On Jan 5, 5:35=A0pm, Jordon <jordon@REMOVE~THISmyrealbox.com> wrote: > Can anyone tell me what I should use (in the way of helper cells) > to tak...

how do I format cells to change date and time to just date
I want to format a column that contains date and time and I want it to show just the date and not the time. Going into format and clicking on the date and changing doesnt work. Probably the cells aren't really dates, but text. You can check with the ISTEXT() function. If they are text, formatting doesn't have any effect. -- Kind regards, Niek Otten Microsoft MVP - Excel "bondam" <bondam@discussions.microsoft.com> wrote in message news:F4D61EC1-30E2-4723-89E1-F47B545818EE@microsoft.com... >I want to format a column that contains date and time and I want it t...

Calculate age as of a date certain
Employee benefit enrollment requires the age of each employee as of a specific date, such as 1/1/2005. Given the date of birth, how would this be calculated? -- Joe S. Hi see: http://www.cpearson.com/excel/datedif.htm#Age -- Regards Frank Kabel Frankfurt, Germany "Joe S." <JoeS@discussions.microsoft.com> schrieb im Newsbeitrag news:0EC4F9E5-2E60-448A-A107-7B085BC764C5@microsoft.com... > Employee benefit enrollment requires the age of each employee as of a > specific date, such as 1/1/2005. Given the date of birth, how would this be > calculated? > -- > Joe ...

Conditional formatting a date range
If I have a column of dates that are manual entered what is the formula to conditionally format them based on a date range of three months before the current date to the current date and another three months after the current date to the current date? Assume the dates are in column A, starting with A1. Highlight all the dates, with A1 as the active cell, and click on Format | Conditional Formatting. In the dialogue box you should select Formula Is rather than Cell Value Is and then enter this formula: =3DAND(A1>=3DTODAY()-91,A1<=3DTODAY()) Click on the Format button and choose the ...

Date/Time stamp in Memo Field
Hi all..is it possible to programmatically insert Now() when text in a Memo field becomes edited? Thanks for all help! If it has to be entered directly in the memo field tetxbox: Private Sub MemoFieldName_AfterUpdate() If IsNull(Me.MemoFieldName.OldValue) Then Me.MemoFieldName = Now & " " & Me.MemoFieldName Else Me.MemoFieldName = Left(Me.MemoFieldName, Len(Me.MemoFieldName.OldValue)) & " " & Now & " " & Right(Me.MemoFieldName, Len(Me.MemoFieldName) - Len(Me. MemoFieldName.OldValue)) End If Me.Dirty = False End...

Pivot Table from two worksheets
I am trying to create a pivot table from two worksheets. Each workshee represents different accounts from which I am tracking expenses. I hav these columns on both sheets: Type of Expense (labeled A, B, C, D) Date, Description, and Amount. I want the pivot table to organize all of the data from both sheet according to Type of Expense and show the Date, Description, and Amoun under each Type of Expense. I can get it to organize it by Type o Expense and show a total for each, but how do I get it to show thi additional information? Thanks -- Message posted from http://www.ExcelForum.com ...

Add Actual End Date to Resolved Cases view
Hi We would like to add the actual end date to the Case General Tab or possibly to the Resolved Cases and/or My Resolved Cases view. I know that the Actual End Date is available on the Service Activity and Case Resolution but this field is not available for the Case. Any workaround for this? Thanks Mark ...

Search Option
I have a form that contains a subform with several fields of information. I'm looking for a code that allows me to enter any type of information on the main form and have the subform search and apply a filter. Can anyone help or atleast direct me in the right direction? See: Search form - Handle many optional criteria at: http://allenbrowne.com/ser-62.html -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Dennis" <Dennis@discussions.micro...

due dates #5
thanks alot guys I have it working now this will save me a ton of scanning over dates with a visual que I have 8 pages with 6 rows of due dates on each pag -- canma ----------------------------------------------------------------------- canman's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1459 View this thread: http://www.excelforum.com/showthread.php?threadid=26223 Glad to hear that, canman ! Thanks for the feedback -- Rgds Max xl 97 --- Please respond in thread xdemechanik <at>yahoo<dot>com ---- "canman" <canman.1czh20@excelforum-n...

Update cell based on date range
Hey guys! I was wondering if I could get some help here. I would lik to update a cell based on a date range. For example, I would like t update the value of a cell to the value of another cell if the curren date is between July 1st and July 10th. However, if the date i outside the date range, I want the value for that cell to not b updated, and be the previous value. Can anyone give me an example a to how I would do this? Thanks!! -- deversol ----------------------------------------------------------------------- deversole's Profile: http://www.excelforum.com/member.php?action=geti...

Saving a file as the "date" it was created
I have a load of spreadsheets that I need to file in the same folder. The problem is each one has the same filename. Does anyone know how to save a file as the date that it was created on thus saving me having to go through 100's of files and do it manually. Thanks Dave Woodgate Activeworkbook.SaveAs Filename:=Format(Now,"yyyymmdd hhmmss")&" "&Activeworkbook.Name -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Dave" <dave.woodgate@gmail.com> wrote in message news:1147856944.197931.244350@i40g2000cwc.googlegroups....

Is possible to have two internet domains
I have two internet domains, domain1.com and domain2.com for example, i want to receive and send mail from both domains, is possible to make this configuration? Thanks Yes, it is but what your asking is vague. Are you setting up exchange, outlook, or what ? "Paul Hernandez" wrote: > I have two internet domains, domain1.com and domain2.com for example, i want > to receive and send mail from both domains, is possible to make this > configuration? > > Thanks In this moment i just thinking how to configure this, i have domain1.com and domain2.com, and i want t...

Sorting Search Results
I there a way to sort search results to see the messages with the latest responses first? Thanks, ...

Online Payment Dates
I use Money 2005 Deluxe. I know this topic has been covered before, but I'm trying to figure out how to get an online payment to show up in the register with the proposed date of payment (similar to entering a post-dated check in the register), rather than the date I enter the transaction. Perhaps it's some register preference setting I've overlooked? When I make my online payments, I generally save these entries as drafts first so I can review them before committing to sending them off. Does this possibly have anything to do with this issue? Many thanks in advance for y...