Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2006
    Location
    Oklahoma City, Oklahoma
    Posts
    3

    Having trouble with dates in my Data Base!!!!


    Im trying to set up a Query that will give me the lastest date entered for a particular serial number. My table is set up like this:

    Serial # | Date |
    610 13-jan-00
    620 13-jan-01
    630 10-aug-03
    610 10-aug-04
    620 11-jan-06
    620 01-feb-06

    The results I want is:
    610 10-aug-04
    620 01-feb-06
    630 10-aug-03

    Do I have to have two separate databases? or insert SQL code? Im familar with access however just learning SQL code. Any help would be greatly appreciated!! Thanks!! :?

  2. #2
    StepUP is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Dec 2005
    Posts
    99
    Use a "Totals" query, Group By the date field and use the "Max" function for the Serial # field.

  3. #3
    Join Date
    Feb 2006
    Location
    Oklahoma City, Oklahoma
    Posts
    3
    Thanks "SetUP" for your response. However, I have a few questions: (1). Does the their has to be two seaparte tables? (2) The "MAX" function will allow the program to display all the serial# instead of all the top record according to date? (3). The group by date will tell the program to group by date for each serial# is that correct? Please forgive me for my ignorance and Thanks Again for your Help!!

  4. #4
    StepUP is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Dec 2005
    Posts
    99
    1) No...the query runs off the single table in your example.

    2) No..that is the point of the MAX function. It just shows the maximum date value for the serial # field.

    3) Yes.

    Did you actually try it in a query? If you do, you will see the results that you were looking for in your example.

  5. #5
    Join Date
    Feb 2006
    Location
    Oklahoma City, Oklahoma
    Posts
    3
    Thanks I will try it!!

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

Similar Threads

  1. calculating due dates in access
    By trixxnixon in forum Forms
    Replies: 0
    Last Post: 09-28-2008, 12:35 PM
  2. Searching Dates
    By knightjp in forum Database Design
    Replies: 2
    Last Post: 08-16-2008, 11:39 PM
  3. Help with Searching Dates
    By rededdie in forum Access
    Replies: 1
    Last Post: 11-02-2007, 08:34 AM
  4. Hi ! Im having time trouble
    By gayano in forum Access
    Replies: 0
    Last Post: 06-28-2007, 12:10 AM

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