Solved

Pasting from excel

Posted on 2011-09-17
4
337 Views
Last Modified: 2013-11-28
Hi All
I have a form with underlying table that I use to add data occationally by pasting from excel. In the table there are no filters no sort by fields or any other interfearence that I can see. When the data is pasted into the form it is correctly ordered as it was in excel, but the underlying table somehow stores the Data randomly rather than in the order that it was when pasted. I don't want to add any counter fields as there is already a autonumber (Set to Random) on the table linked to a parent.
I just cannot see any reason for the strange random storage. Any Ideas?
0
Comment
Question by:DatabaseDek
  • 2
  • 2
4 Comments
 
LVL 12

Expert Comment

by:pdebaets
ID: 36555126
If your primary key is set to autonumber random, then that could explain why your records (when sorted by the primary key) appear random. I'd suggest setting the primary key to autonumber increment. Then a key will be assigned incrementally based on when it was pasted. This should preserve the order you pasted it in.
0
 

Author Comment

by:DatabaseDek
ID: 36556048
Hi pdebaets

Are you saying that even when sort order is set to not sorted that Access overrules this and sorts it anyway? Unfortunately I cannot use increment as I sometimes need to paste from other tables and if there is already that number in the system it will cause an error.

Thank you
0
 
LVL 12

Accepted Solution

by:
pdebaets earned 500 total points
ID: 36556764
The default sort order for the table will be the primary key sort order. You can change this by sorting on a different field, then saving the table.

Your problem with pasting from another table would seem to exist regardless of whether you use autonumber increment or autonumber random.

You can force an autonumber field to start at a particular value. Perhaps you can start it after the maximum value of any record you might want to paste. More info is at: http://allenbrowne.com/ser-26.html
0
 

Author Closing Comment

by:DatabaseDek
ID: 36559039
Thank you.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now