Any quick easy way to add AutoID to query

mrchonginhk

Well-known Member
Joined
Dec 3, 2004
Messages
679
I have a query result and I want to add a new column called ID to be like this, simply, 1,2,3.. etc

Pls help how to do it quick. Thanks a lot.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
well you can do yourself a favor by adding an autonumber to your table that you pulled from. if you don't have one, copy it into a new table where an autonumber already exists. then you won't have to worry about dynamics in the future.
 
Upvote 0
well you can do yourself a favor by adding an autonumber to your table that you pulled from. if you don't have one, copy it into a new table where an autonumber already exists. then you won't have to worry about dynamics in the future.


The problem is the data source is an external data.
So the table itself does not have datasource. What can we do here ?
 
Upvote 0
Well, there is a way to do it, but it is extremely volatile and unstable, and I would not recommend doing it.

What is the reason you need this? If we know what you end goal is here, we maybe able to provide some other suggestions.
 
Upvote 0
My case is:
My table is a linked external source with no auto number
I need to assign one in Access.

Thanks
 
Upvote 0
All I can think of is to load the data to a temporary table that does have an autonumber key? I.e., run a make table or append query when you need the data. But this is curious - if there is no such sequence in the original table what purpose does it serve in the query? I don't believe I've run across this before.

ξ
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,304
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top