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

primary key ids

ResolvedVersion 2007

Robert has attended:
Access Intermediate course

Primary Key IDs

I'm trying to add a new entry into the database. Previously this would be done either by form or in the table itself, and a new ID would be generated for the new entry.

However now, it is generating duplicate numbers on the ID and creating errors. I have looked in design view > indexing and 'no duplicates' is turned on.

Please advise

RE: Primary Key IDs

Hi Robert,

Thank you for your question and welcome to the forum.

What is the Data Type for the field? Maybe the number of records have exceeded the maximum amount.

Regards

Simon

RE: Primary Key IDs

Hi Simon,

Thanks for the response.

The data type for the id field is autonumber, field size long integer and new values are increments. The record numbers aren't in excess of 3000

Regards,
Rob

RE: Primary Key IDs

Hi Rob,

Is it possible to send me a copy of the database to sk@stl-training.co.uk?

Regards

Simon

RE: Primary Key IDs

Simon,

Would rather not as the database contains sensitive information. However, I somehow managed to rectify the issue today by just saving a copy. However this copy is now about half the file size of the original yet no data is missing.

Understandably I am happy but this does strike me as rather odd. Do you have any insight into this?

Regards,
Rob

RE: Primary Key IDs

Hi Robert,

Thank you for your response.

It may be that the database was compacted on close which may have contributed to the smaller file size.

Regards

Simon

RE: Primary Key IDs

Hi Simon,

Thanks for your help.

Regards,
Rob

Access tip:

Choosing data types in Access

Not sure which data type to use for your Access fields? Here are some guidelines to help you choose a data type to assign to a field.

- The Text data type can accept up to 255 characters. For information that will be recorded in paragraphs, use Memo.

- Also use Text for numbers that aren't going to be used in calculations, e.g. phone numbers.

- Use the Currency data type for monetary amounts.

- Use Date/Time for dates.

- Most other numbers can use the Number data type, but the Field Size property may have to be altered.

- For fields that have only two alternatives (yes, no) use Yes/No data type. If there is likely to be a third entry option (e.g. maybe or don't know) use Text instead.

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