Solved

Pasting from excel

Posted on 2011-09-17
4
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

696 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