Querying Dates

Hello,

I have a query with information in it and then one of the fields is a date
field.  I would like to further query it so that it only takes the
information for the people that are before a certain date.  Everything after
that date I dont want.  

For ex:  name address date

           Jane Doe    Whatever St.         12/3/08
           Doe Jane    Who Knows St      12/15/09

I would like to quere out the people that have a date before 12/10/09.  I
tried when I do my query to just put under the date field <12/10/09, but that
didnt work for some reason.  It's seems simple enough, I just can't get it
off the top of my head.

Thanks

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200912/1

0
scottydont2121
12/22/2009 3:21:58 PM
access.forms 6864 articles. 2 followers. Follow

2 Replies
575 Views

Similar Articles

[PageSpeed] 27

I figured it out.  When I imported it in, Access put the date field as a text
field and not a date field.  Switched it and it worked fine.

scottydont2121 wrote:
>Hello,
>
>I have a query with information in it and then one of the fields is a date
>field.  I would like to further query it so that it only takes the
>information for the people that are before a certain date.  Everything after
>that date I dont want.  
>
>For ex:  name address date
>
>           Jane Doe    Whatever St.         12/3/08
>           Doe Jane    Who Knows St      12/15/09
>
>I would like to quere out the people that have a date before 12/10/09.  I
>tried when I do my query to just put under the date field <12/10/09, but that
>didnt work for some reason.  It's seems simple enough, I just can't get it
>off the top of my head.
>
>Thanks

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200912/1

0
scottydont2121
12/22/2009 3:59:50 PM
The criteria you used is interperted as 12 divided by 10 divided by 9.
Use this --
<#12/10/09#
-- 
Build a little, test a little.


"scottydont2121 via AccessMonster.com" wrote:

> Hello,
> 
> I have a query with information in it and then one of the fields is a date
> field.  I would like to further query it so that it only takes the
> information for the people that are before a certain date.  Everything after
> that date I dont want.  
> 
> For ex:  name address date
> 
>            Jane Doe    Whatever St.         12/3/08
>            Doe Jane    Who Knows St      12/15/09
> 
> I would like to quere out the people that have a date before 12/10/09.  I
> tried when I do my query to just put under the date field <12/10/09, but that
> didnt work for some reason.  It's seems simple enough, I just can't get it
> off the top of my head.
> 
> Thanks
> 
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200912/1
> 
> .
> 
0
Utf
12/22/2009 4:11:02 PM
Reply:

Similar Artilces:

IIF stmt in query
I would like to return different results for different conditions more than one field. here is my IIF stmt: IIF([transactiontbl.insttype]="A",”FMYHF0002”,IIF([transactiontbl.insttype]="B","FMYHF0003”,IIF([transactiontbl.insttype]="T",”FMYHF0005”,0))) or IIF([etype]=”R”,”FMYHF0004”,”FMYHF0006”) any help is greatly appreciated. Thanks You can AND the conditions, but it would be preferable to use a table to make the translations. iif( type = "A" AND country = "USA", "FMYHF002", iif( type = "A"...

sales line detail window-after updating the request Ship Date-also
I am also using manufacturing, when you change the requested ship date, you get a window asking: You can update the In House due date, What is the name of this window in modifer? I would like to modify this form, so the No button is disables, I want to make sure they always click 'yes' How do I find this form in modifer? the form name is just 'Microsoft GP Dynamics' thanks -- Doug ...

Report of sales by month based on a cross tab query
Hi, I have a cross tab query that will provide sales by month for 2008. Right now it is sales for January08. As there are sales for future months, they will appear as well. I want to create a table that has all of the months listed out already. Right now, on the first day of the month, I go into the report and add the new month. I want it so that all month are listed which I have done. The problem is that when I run the report, I get an error that says "the Microsoft Jet does not recognize February as a valid field name. After today, there will be February data but no March ...

Posting Date used in Revenue Expense Deferral
I have a PM Invoice with Document Date 16/11/2009 and Posting Date of 01/12/2009. Entered Deferral details starting 01/12/2009. In GL the deferral charges commence 01/12/2009 and are all as expected. The Credit entry for the full invoice is posted to GL with posting date of 01/12/2009. The problem I have is that the Debit entry for the full invoice amount is posted to the document date of 16/11/2009 and I want it to be the same as the invoice posting date (01/12/2009) Is there a way to do this? Thanks Audrey ...

ODBC Failure In JOIN Query ??? (BUT....)
I have a query that is simply a combination of 3 other queries (joined by 1 common field in each). Each of the 3 "sub queries" will execute fine, Individually.... But....that final query which simply combines them all will display an ODBC failure error. I'd always assumed that if each individual query ran okay....the query which combines them should not get such a data-access related error (since the core data is already being successfully accessed). Has anyone else experienced this and found a solution? Thanks very much -- Message posted via AccessMonster.com http://www.a...

Can excell notify me of due dates?
If I have due dates on my worksheet can I set something up so that I am notified on these dates? I've used this to help me. http://www.contextures.com/xlCondFormat01.html "Deion007" wrote: > If I have due dates on my worksheet can I set something up so that I am > notified on these dates? ...

Pivot Chart: Stop skipping Dates on X-Axis
I have a pivot chart which pulls 2 pieces of information from one table 1 and 1 from Table 2. All three entries are included for each day. Except somedays which may have only the one piece of data from Table 2 or none at all. How do I get the table to automatically fill in all the days whether they have information or not? =?Utf-8?B?UHJpbmNl?= <Prince@discussions.microsoft.com> wrote in news:A5EF53AB-6063-434F-BFC3-43259301751D@microsoft.com: > I have a pivot chart which pulls 2 pieces of information from one > table 1 and 1 from Table 2. All three entries are included for &...

Excel date changes
I have created a spreadsheet using excel which requires the use dates on a monthly basis (similar to a calendar). The problem I have is that every month I have to go in and change the dates on the spreadsheet to reflect those of the current month before printing. Is there a way I can make it so that excel does that for me every month. Thanks, I'd really appreciate the input. Please elaborate on what the spreadsheet looks like. "phonescoop@hotmail.com" wrote: > I have created a spreadsheet using excel which requires the use dates > on a monthly basis (similar to a cal...

LINQ related query
Hi I have a question regarding joining xml files on a key which is present in all file, following is my code docFTR is of type XDocument xdList is List(Of XDocument) Dim doc = From x In docFTR.Descendants("Data") From i In xdList.GetRange(0, 1) Join d In xdList(0).Descendants("Data") On x.Descendants("Guid").Value Equals d.Descendants("Guid").Value i need to programmatically replace xdList(0) with the current XDcoument which comes from "From i in xdList.getRange(0,2)" GetRange(0, could be 2 to 10) Any help is welcome...

Dates #12
I have a rather looooong list of dates (mm/dd/yy). In a column beside it I want just month and year so I can, for example, find all books sold in a month range. Can you help? NO need where rngA has your dates and rngB is a count of the sales =sumproduct((year(rngA)=2004)*(month(rngA)=8)*(rngB)) to sum rngC if it had the price total for each date =sumproduct((year(rngA)=2004)*(month(rngA)=8)*rngC) -- Don Guillett SalesAid Software donaldb@281.com "Lyndie" <anonymous@discussions.microsoft.com> wrote in message news:83fd01c48543$7d211680$a501280a@phx.gbl... > I have a ...

can i see the date the last time a cell was changed?
I am trying to figure out a formulla to make the date appear in one cell everytime anouther cell's data is chaged. Use a worksheet_change event to copy the cell address and put in a date stamp. -- Don Guillett SalesAid Software dguillett1@austin.rr.com "JohnNuTek" <JohnNuTek@discussions.microsoft.com> wrote in message news:5085A544-CBF4-4B81-A244-B03DE9A0E9E6@microsoft.com... >I am trying to figure out a formulla to make the date appear in one cell > everytime anouther cell's data is chaged. There really isn't a worksheet formula to do that. Typicall...

Query Not Working 06-11-07
Hello, I have set up a query for 1 table. The field I'm trying to run the query on is a text field. I enter a name (="smith, john") I get zero results. However I have confirmed that this user exists in the table. Also (if this helps), this field gets populated via a combo box on a form. The table being used for the lookup contains a "user" field which is also a text field Thanks. sometimes this is caused by a leading blank in the field. It displays very narrow. one solution sname: TRIM([field]) "CT" <ctroy01@hotmail.com> wrote in message ...

Microsoft Query #4
I receive message SQL0104 when changing a column heading in Microsoft Query while using the Client Access ODBC driver to connet to an iSeries 400 server. I have been informed by IBM that this is a problem with Microsoft's Query in that it incorrectly quotes the new Column Heading name before sending it to the ODBC Driver . Is anyone aware of a update or solution? Thanks Nick Thanks everyone, I just located the following Microsoft Knowledge Base Article 298955, I followed the procedures below, and the SQL0104 error went away. 1. Quit all Office programs.. 2. Click Start, and ...

if statement with dates #2
I would like to have a statement like: IF(a1>0,1/1/2004) with 1/1/2004 beint a date. EXCEL is interpreting 1/1/2004 as an arithmetic statement and giving me the result of the arithemtic. I could put in the numeric offste for the date and write IF(a1>0,37987), formatting the cell as a date, but this seems awkward. What else can I do? TIA, Sanford ...

Combo values from query based on form fields
I am setting the values for a combo box in a form(s) via a query that 'filters' the results with criteria based upon the values of other fields on the form. The combo is a field that is bound. However, this is giving all kinds of problems ranging from Access completely crashing to being asked for the parameter values of those criteria fields when closing the form. I have tried making the combo an unbound field and then setting the value of the bound field to that unbound field after update, but that still leads to the same issues. How can I do this? As example - I have a form w...

Change the format of my footer {date} option?
I would like to show the date in my footer as January 25, 2005 instead of the default 01/25/05 Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.LeftFooter = Format(Date, "mmmm dd, yyyy") End With End Sub put this in the ThisWorkbook code module. -- HTH RP (remove nothere from the email address if mailing direct) "Tori" <Tori@discussions.microsoft.com> wrote in message news:817363F1-32AB-4528-B1D6-304F8E712EA8@microsoft.com... > I would like to show the date in my footer as January 25, 2005 instead of the &g...

Union Queries and Foreign Keys
I have a Union Query that combines two tables with identical fields/data types. The problem I am having is trying to get the resulting recordset to display the names of the organizations instead of the OrgID value. The recordsets that display when running the Queries that the Union Query is based on display the Organization name properly. Is there a way to do this using a Union Query? Thanks, russr First they ignore you. Then they laugh at you. Then they fight you. Then you win....Mahatma Gandhi Russ Rollins wrote: >I have a Union Query that combines two tables with identical >fields/d...

sorting activities for each lead/contact by actual end dates
When I view the activities associated with each lead and contacts, the actual end date are not shown. Does anyone know how I can dispaly this field? The activities list in workplace does show the actual end dates but we'd like to see that when we access the list through indivial contact/lead record. Thanks, Victoria Hi Victoria, There is no good out of the box way to do this in MSCRM today. We're working hard to fix this for v2.0. Many of our customers have worked around this issue by registering for a post call out on the activity creation, and then having a custom object wh...

Pasted fractions converted to dates
I'm trying to copy a table containing text, decimals and fractions from a word table into excel. How can i stop the fractions from becoming dates when pasted? ie. 1-5/8 becomes 1/5/2008 and 9/16 becomes 16-Sep. Its the hyphen that is causeing the trouble. A fraction in Excel has the form 1 5/8 with a space between the integer and the fractional parts Can you get rid of the hyphen in the Word doc? best wishes Bernard "Jon_C" <JonCCrouch@gmail.com> wrote in message news:1192110561.240426.147550@o3g2000hsb.googlegroups.com... > I'm trying to copy a table containin...

Auto copy dates from one cell to another
I have a multiple page worksheet. In A8 is for the Employee Name and in B8 is for the date. I would like for this information to automatically be placed at A96 and B96 which is the top of the second page within the worksheet and so on for the remainder of the pages. Position cursor in cell A96 and enter the formula: =A$8, and in B96 the formula =B$8 Copy these two cells to the appropriate cells on the other "pages" of your worksheet. Pete Hi Kelly, In cell A96 you fill out the formula =A8 In cell B96 you fill out the formula =B8 this formula tells excel to take the val...

Microsoft query returns no data, Office 2000, Excel
I run a query in Microsoft excel, with Microsoft access as the data source This spread sheet is accessed throughout our company, and works fine on all PC's but one The query returns no data on this particular PC In addition it does not return any errors Could someone assist me regarding this quandary ...

counting dates <= 7 days ago based on criteria in a diff column
I have a spreadsheet that holds all tasks for a project. Column D holds a catagory and column Q holds the date closed. I need a formula (on a separate sheet) that counts all tasks of a specific category that were closed in the past 7 days. I already have a formula that calculates all tasks that were closed in the past 7 days, just need to add the additional criterion of the category. Hi, Try this =sumproduct((sheet1!D2:D30=A2)*((today()-sheet1!Q2:Q30)=7)) A2 on sheet2 has the specific category for which you want to count the closed tasks -- Regards, Ashish Mathur...

Charting challenge/query
The following quote is posted on behalf of a client using Windows and Office 2003 Standard. Please email responses directly to me, too, since I do not read this group much. Any help/insight would be most appreciated. I'll do my best to relay any questions people have and bring back any answers to said questions. <quote> The Goal: In an effort to come up with a new way of looking at organizational structure, I employed Excel's 'Donut Chart' function. My goal was to have the head of the organization in the middle of the chart and then that person's direct re...

Open one form with different queries
Is it possible to open one form using a different query depending on what button the user selects. For example: Sort High/Low Sort Old/New Search MRN Search Account# Search SSN I should also mention that this form has a subform. Got it. Below is what I put behind a button on the form for Sort High/Low and it filters using a query. Dim stHighLow As String stHighLow = "SortHighLow" DoCmd.ApplyFilter stHighLow "Sash" wrote: > Is it possible to open one form using a different query depending on what > button the user selects. For example...

Opening an old Word document, date changed to current date
When I open old Word documents, the date gets automatically changed to the current date and I can't view the date that the document actually had. I am using MS Office 2007, but the old document was created in Word 2003. I can see the date that the file was last modified in the details of the file, but I cant guarantee that the date of the document is the same as the date last modified for the file. Press Alt+F9 to toggle the field code display and edit the DATE field code to read CREATEDATE. Then Alt+F9 to toggle back and F9 to update. The date displayed will be the date th...