Results 1 to 6 of 6
  1. #1
    pyog is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    2

    Get Recent Record without Id or date

    I want to get recent record from table without considering Id or Date



    Please Help

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Well you're going to have to tell us more. We can't guess what your table and field might be.
    If you want help, tell us
    -what your trying to do exactly,
    -show us what you have tried, and
    - what errors did you receive (if any)?

  3. #3
    pyog is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    2
    Thanks for your quick reply.

    I want to fetch recently added record
    In table there are 5 field and at every 1 minute entry added in database table
    table does't have any primary key or any date field

    So I need recent record entry
    (Table already created by another person and application is running over that database)

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Get some sort of record number on your table. And increment it with each new record.

    What does recently mean? In the last week, month,hour???

    If getting a recently added record (whatever that might mean) is a requirement, then the database structure is not meeting requirements.

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I agree that there are design issues. You can try Last() or DLast(), which I've never had a need for but theoretically find the last record entered:

    http://support.microsoft.com/kb/208190
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Be cautious of Last, there is a lot of info saying it can not be trusted. DLast may be a better choice.
    Regardless, you have a structure issue that you should correct.

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

Similar Threads

  1. Replies: 9
    Last Post: 01-28-2011, 06:05 PM
  2. Displaying Most Recent Record
    By viper in forum Forms
    Replies: 7
    Last Post: 11-16-2010, 10:06 AM
  3. Replies: 4
    Last Post: 05-04-2010, 03:33 PM
  4. Return most recent entry for each item
    By GenAp in forum Queries
    Replies: 1
    Last Post: 02-04-2010, 05:30 AM
  5. most recent entries
    By tom4038 in forum Queries
    Replies: 0
    Last Post: 09-14-2009, 04:41 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