Solved

Pasting from excel

Posted on 2011-09-17
4
339 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

839 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