Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

storing unique id

Forum home » Delegate support and help forum » Microsoft Access VBA Training and help » Storing the unique ID

Storing the unique ID

ResolvedVersion 2016

Manny has attended:
Access Intermediate course
Access Advanced course

Storing the unique ID

Hi Guys,

I know we can utilise the autonumber as a unique identifier. i intend to use this, however, in my database i will be having records being appending back and from tables, am i able to store the autonumber as a static field constantly? i.e. here would be the design


ID (auto)
StaticID (stored auto number)

So whenever this is appended or moved across, the ID will always be noted when it will enter the primary master table?

Manny

RE: Storing the unique ID

almost like a master ticket reference. So I will be able to pull the entire audit history for a ID, no matter no how many time its auto number has changed hands?

RE: Storing the unique ID

Hi Manny,

Thank you for the forum question.

You will need in the "new" table (the table you want to append the data to) to have a column which store the auto number from the source table and a primary key column in which you have the new autonumber.

I have created a tiny database (see attachment)


Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Attached files...

manny.accdb

RE: Storing the unique ID

Hi Jens,

I can't see your attachment unfortunately?

Manny

RE: Storing the unique ID

ah, i had something similar. i think it this should hopefully work fine!

RE: Storing the unique ID

Hi Manny,

I hope that you have got the attachment. Sometimes it takes few minutes to be visible. If you in the future cannot see an attachment wait few minutes and refresh your browser.

I hope, that the solution works for you.


Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: Storing the unique ID

got it, Jens. Thanks.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Access tip:

Random sampling

Data is th key to a good database, therefore checking is essential.

A good way of checking data is by random sampling. You can do this in a query, by typing the follow:
1) In the Field box create a RandonID field eg. Randon Id: Rnd(fieldname])

2) sort the field
3)Right click and chage the properties for To value to be the number of randon records you want to see.

4) Change the set to Show row for Randon ID to be False, add all the other fields you want to see and the run the query.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.