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?
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?
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
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.
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.
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.
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
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
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.
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.
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.
Actually I imported the table into other database. the row order looks good now ( unknown reason) .