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

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
access training course - access primary keys

Forum home » Delegate support and help forum » Microsoft Access Training and help » access training course - Access Primary Keys

access training course - Access Primary Keys

ResolvedVersion Standard

Reza has attended:
Excel Advanced course

Access Primary Keys

I have got two questions; In regards with primary key, how can access increment user specified PK. In other words, if I decide to set my OWN primary key (i.e. 9874, 9875, 9876,...) how can we assign Access to increment by one each time we enter the new data/record in form.

My next question is, I have seen in other forms that once user enters the date into one field, the information for other specified field retrieved automatically. For example, as soon as I insert the Date into my Date Field of my form, the Week number pops out into my Week Number field. I think this is something to do with Lookup/Searching wizard.

Thank you

RE: Access Primary Keys

Hi Reza

As far as the primary keys in Access goes, you just need to set the start number of the primary key and then Microsoft Access will auto-increment the same as normal. So you are still using auto-number, but you are just giving Access a user defined start number.

In relation to the auto fill, you would be best by checking with the developer of you system as they could be using vba or visual basic coding.

Hope this helps
David

RE: Access Primary Keys

Hi David,

I have tried on many occasions to define my own start number for primary key and let Access to auto-increment it. Still it does not work. Can you please instruct me step-by-step how do I define it.

Also recently I have error msg "OpenReport Action Cancelled " when I attempt to click on my buttons. Any solutions?

Regards
Rez

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.13 secs.