Results 1 to 4 of 4
  1. #1
    mp3909 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    136

    Recordset

    Hello,

    I have a table in access - its only consists of 4 records.


    I opened up this table using a recordset.
    I am now debug.printing the contents of this recordset and noticed that it does not follow the same order as my table.
    i.e. the first record in my table is showing in the 3rd row of my recordset.

    Is this normal?

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Quite possible. As with a query, the records will be in any order you specify and if you don't specify an order, Access will sort by the first field.

    Do you really need to use a recordset to 4 records?
    A query will almost certainly be faster in practice
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    In addition to what Colin said, Be Aware that a table has no inherent order.
    A table is a "bit bucket"; to introduce order (a "sort") to the data, use a query (recordset) with an Sort ("Order By" clause).


    My $0.02........

  4. #4
    NTC is offline VIP
    Windows 10 Access 2013
    Join Date
    Nov 2009
    Posts
    2,392
    use a timestamp field in the table to establish the order of entry into a table

    add a field to the table: tStamp (do not use the name Time which is reserved)

    in the field's property set the default value to: =Now()

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

Similar Threads

  1. Replies: 4
    Last Post: 01-22-2015, 09:57 AM
  2. Replies: 6
    Last Post: 12-03-2013, 11:14 PM
  3. How to Select second Recordset from first recordset
    By FrustratedAlso in forum Programming
    Replies: 28
    Last Post: 05-10-2012, 05:45 PM
  4. Replies: 2
    Last Post: 03-08-2012, 12:59 PM
  5. Replies: 1
    Last Post: 11-13-2009, 03:03 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