Results 1 to 3 of 3
  1. #1
    pkg206 is offline Novice
    Windows 2K Access 2003
    Join Date
    Nov 2009
    Location
    India
    Posts
    3

    Query to extract record of particular year

    Hi,



    I have a table with fields: name, designation, deptt, date of birth(DOB) and date of retirement(DOR). With the help of query I am calculating the field DOR like ..DateSerial(Year([DOB])+60,Month([DOB])+1,0).. and the month end date after 60 years of DOB is calculating but the problem is that I want to get data for only one year like persons about to reitre in 2010. I got the information if I fix the criteria in DOB field in query and it is working fine (like .. Between [between dates]![month] And [between dates]![MONTH1].. but if I do it with DOR, its not working (may be because I am also calculating the field and putting criteria). Please help

    Pankaj

  2. #2
    dcrake's Avatar
    dcrake is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Aug 2009
    Posts
    435
    Once you have your query working without any criteria in it save it and open a new query based on this query and put your criteria in there.

    David

  3. #3
    pkg206 is offline Novice
    Windows 2K Access 2003
    Join Date
    Nov 2009
    Location
    India
    Posts
    3
    Thanks David, I tried to save the query and the result is fine and I opened another query based on my previous query and put up the criteria .. Between [between dates]![month] And [between dates]![MONTH1].. but again no result are coming. in 'between dates' table both the field i.e. month and month1 are date fields. Whenever I run the sub query based on my previous query with the above criteria, it shows no result. Pl. help (I would like to prefer the command within the table/query/form etc instead of using sql command). Thanks in advance

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Extract text from middle of a field
    By AccessNubie in forum Access
    Replies: 3
    Last Post: 11-02-2009, 01:13 PM
  2. Replies: 2
    Last Post: 09-10-2009, 08:21 AM
  3. Date manipulaton for Financial Year
    By Neil Bingham in forum Access
    Replies: 0
    Last Post: 02-15-2009, 11:24 AM
  4. Extract numbers from text string strored in a field.
    By khabdullah in forum Programming
    Replies: 2
    Last Post: 12-23-2007, 06:55 PM
  5. How to extract names from 1 large field
    By Tepin in forum Access
    Replies: 1
    Last Post: 12-04-2006, 01:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums