| Chat with a LIVE Microsoft
Access Expert! |
||||
|
||||
|
#1
|
|||
|
|||
|
table error with autosorting
Hi there i use MS access to manage a small amount of data but i'm getting annoyed by my basic table structure.
i recently replaced all the data in the table with new data, but now i am adding new records. thing is, tables normally default back to their original settings and layout when you enter and exit, but for sme reason, new records are appearing at the TOP of the table, instead of at the bottom. i can re sort the table (TableID = ascending & then save) but as soon as i refresh the table (remove filter), the new records go to the top and away from other more recent records. really annoying. i have replicated this problem a number of time with brand new tables and it's not a corruption, it happens every time. oddly the new ordering of the table changes with each record, and it seems random. can anyone help. i DO NOT want to use a query, i have plenty of those. i want my basic table to default back to the original order it was entered and the chronoligal order of the ascending primary key. cheers, alison |
| Sponsored Links |
|
#2
|
||||
|
||||
|
Quote:
A table is an unordered dataset. When you view the table data in Access you aren't seeing the data as it exists in the underlying file, you are seeing a view of the data. In other words, it's a query that is embedded in Access. The order of the records in the table itself is irrelevant. To say that you don't want to use a query is daft. It's like saying you want to drive a car, but you don't want to use the steering wheel. A well designed application shouldn't present the data to the user in a table, and not in a query, either. So applying a sort in a query that gives you exactly what you want seems pretty obvious.
__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones Cheers, Neil |
|
#3
|
|||
|
|||
|
Quote:
Tables are retained in one of two orders: Chronological order of entry - if there IS no primary key, or order of primary key - if there IS one. There is no alternative to one or the other of these two orders. With a query, you have not less than as many possible orders as you have fields - times 2 since you can choose ascending or descending for any field sort order. More, actually, since there are not only combinations but permutations possible if you need a really specific sort order involving multiple fields that are individually not unique but that are unique as a compound key.
__________________
I'm a certified grandpa and proud of it. Not quite so valuable after the MVP status expired. |
|
#4
|
|||
|
|||
|
Quote:
i've been using table to store my data for years and it's only done this recently. note that that's all i'm using it for, i'm not a programmer and this is not an application that i'm asking advice on. it's a simple table that isn't behaving as it used to is all. thanks for this alison |
|
#5
|
|||
|
|||
|
Quote:
when you say the table is an unordered dataset, isn't there some order to it? the other guys mentioned it should be either in the order of the primarly key, or in the order that it's been entered? thanks again. alison |
|
#6
|
||||
|
||||
|
Quote:
If a single user were to sit at their workstation and build a new table from scratch, then there'd be a good chance that the order in the file will be chronological and in PK order, too. But if you have more than one user, or you have record deletions, then the chances of having that natural sort order diminishes rapidly. If the order in the table view is obviously different from that way it used to behave, then its clear that somewhere along the line a sort order has been imposed on the table. It may be that a repair and compact or importing all the objects into a new blank database will help restore the previous situation. If all you are using the table for is to store data, then I really don't understand why you don't use a query that returns all the table data to impose the order you want. You can then forget about the table. You can enter data through your query, and base other queries on the query. Then the table sort order is completely irrelevant.
__________________
You can't always get what you want, but if you try sometimes you may just get what you need - Rolling Stones Cheers, Neil |
|
#7
|
||||
|
||||
|
I have found that if I sort a table in a different order while looking at it in datasheet view. The next time I look at it it is the same order provide I answere Yes to the question "Do you wish to save changes to the design of this table?". This seems to confirm Neil's suggestion that you see the table through an internal query.
In ten years experience as an Access developer I feel you should only use tables to store data. REports/Forms should use queries to obtain their data.
__________________
The best solution is the simplest one that meets all requirements. How to get your questions answered promply |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| auto update field - form to table | Old Timer | Forms | 2 | 06-24-2009 07:58 PM |
| Newbie needing Help | MikeyBoi | General | 5 | 04-17-2006 01:32 AM |
| Need some suggestions on table layouts | chad101 | Tables | 16 | 01-08-2006 12:01 PM |
| How to stop unnecessary duplication or records in reports? | MelissaB | Reports | 2 | 03-31-2004 01:36 PM |