Results 1 to 11 of 11
  1. #1
    dollygg is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    73

    moving row in an Access table

    I added one row in a table at the end of the table.(last row). after I reopen the database, that row moved to the first row for unknown reason. HOw to move it to the last row?

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,420
    A database is not like excel so you need to sort the table for consistency. Be aware that table data is stored randomly so without a sort, depending on changes made to the table (adding/deleting/amending records) records might appear in a different order each time you open the table. Won't go into the reasons why since you haven't asked that question but since users should not be looking at table directly, the order you see should be immaterial

  3. #3
    dollygg is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    73
    thanks for your reply. the row order does matter because the fields/columns on my output file is in the same order as the rows in that table. That table is weird. The only way to add a new row is to copy the existing row then paste it onto the table.

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,725
    If order of records in a table is important to you, then use a query to put those records into your desired order.

    eg. Select * from MyTable Order By PostalCode.

    As CJ_London advised, there is no inherent order to records in a relational database table. Users/Nobody should be accessing your tables directly. Queries and or forms based on queries is/are the normal techniques for accessing data(records) in tables.

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,924
    Quote Originally Posted by dollygg View Post
    I added one row in a table at the end of the table.(last row). after I reopen the database, that row moved to the first row for unknown reason. HOw to move it to the last row?
    How are you looking at the table?
    Do you have the OrderBy property set?, as every time I add a new record, it goes at the end of the table.
    Attached Thumbnails Attached Thumbnails Capture.PNG  
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    dollygg is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    73
    I am not able to see the property sheet above when right click on the table name and select "table property". It seems it is locked by the person created this table.

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,924
    Quote Originally Posted by dollygg View Post
    I am not able to see the property sheet above when right click on the table name and select "table property". It seems it is locked by the person created this table.
    Try the Database Documenter, that might show you as well.

    Some code in post #7 here https://www.access-programmers.co.uk...-table.140994/
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  8. #8
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,798
    You don't want to look at table properties dialog; you want to open the table in design view to see its design properties.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    dollygg is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    73
    The design view of the table seems normal. Another weird thing is, I could only copy the existing row then paste it , modify it. This is the way adding in new records . i am not allowed to directly type in data in the very last row , otherwise it will be gone after reopening the database. the original developer might have locked it somewhere.

  10. #10
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,798
    If you are actually entering data into tables, then there must be a data macro on the table. Open table, go to Table tab and explore the data macro options to see if you find an embedded macro. Or copy, compact, zip db and post it here.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  11. #11
    dollygg is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    73
    Actually I imported the table into other database. the row order looks good now ( unknown reason) .

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

Similar Threads

  1. Moving a field from a linked SQL Table to Access Table
    By MFS in forum Import/Export Data
    Replies: 2
    Last Post: 10-01-2020, 09:18 AM
  2. Replies: 1
    Last Post: 09-30-2020, 09:45 AM
  3. Moving a Record to another table
    By Forbes in forum Forms
    Replies: 4
    Last Post: 08-25-2017, 09:20 AM
  4. Moving a new table to the back-end
    By premis in forum Access
    Replies: 3
    Last Post: 07-25-2013, 12:43 PM
  5. Moving row to another table
    By bigmacholmes in forum Programming
    Replies: 2
    Last Post: 10-03-2011, 12:09 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