Questions tagged [autonumber]
158 questions
2
votes
5 answers
how to turn off autonumber in sql?
I am having a dilemma. I have a table with a column called ID and it is the primary key. It is in automated increments so 1, 2, 3, and so forth and the table is 1-8.
A former programmer deleted row 7 and so now there is a gap between 6 and 8. I…

javasocute
- 648
- 2
- 11
- 28
2
votes
2 answers
get autoNumber value from database
The code is below.
in my code I updating existing row(from existing table) that the program get all the updated values from textBoxes.
there is at the end(the last column)of the table autoNumber field which is named as "codonsAutoNum"
I don't know…

user1017315
- 51
- 2
- 8
2
votes
2 answers
InfoPath autonumber field
I am designing an infopath (Change Request) form:
1)How can i add a text box that automaticaly increments to the next number when a new form is created (adding a new Change Request form to the form library).
2)How do i retrieve information from an…

Leon Tayson
- 4,741
- 7
- 37
- 36
2
votes
2 answers
Insert arbitrary value into an AutoNumber column
I have an Access database. My frontend depends on a specific record in one table.
The ID column must have the value 1.
But the column is of type AutoNumber. I cannot create a record with a specific ID.
I tried everything from removing relations,…

juergen d
- 201,996
- 37
- 293
- 362
2
votes
1 answer
Change Access autonumber value
I have a legacy Access database. The VB code in it needs a special record with the autonumber ID value 1 in a specific table.
The table in question has a primary key as autonumber. That column is also referenced in other tables as foreign key. That…

juergen d
- 201,996
- 37
- 293
- 362
2
votes
1 answer
Autolnumber based on last cell in a row value
Following code adds auto-numbers in column A if column B has a value, I would like to change that code so it would start to add autonumber counting from the last row down.
Why?, because if I delete any of the rows with numbers already in the…

FotoDJ
- 213
- 1
- 11
2
votes
2 answers
Access SQL/Logic for Incrementing Key/Field based on composite key
Suppose you have a table in a database that tracks ticket appearances across 9 office locations for between 4 and 5 times periods every day. In each of these time periods, people might appear for one ticket (I guess we can use a transaction model),…

dramerus
- 47
- 5
2
votes
3 answers
Keep value of autonumber column when importing into Microsoft Access database
What I try is to import several tables programmatically from Microsoft SQL Server to Microsoft Access.
Each SQL Server table has an identity column, and the corresponding Access tables, an autonumber column, too.
Now I want to generate SQL scripts…

Uwe Keim
- 39,551
- 56
- 175
- 291
2
votes
2 answers
How to get the AutoNumber generated by an SQL insert
I am trying to write a function to check the minimum value in an inventory table then generate and send a purchase request if the value is below the minimum level.
If the conditions are met an append sql statement like the one below is…

ctall
- 57
- 3
- 10
2
votes
2 answers
Access Enforce Referential Integrity Error: Relationship must be on the same number of fields with the same data types
In Access 2013, I am trying to link an AutoNumber with the field size set to "Replication ID" to another table with "Enforce Referencial Integrity" enabled.
However, I am unable to find a field type that does not provide a "Relationship must be…

Arthur Uzulin
- 83
- 1
- 7
2
votes
2 answers
Ms sql, how to add 2 new columns using autonumber as their counter? in query
here is the link of the picture:
help i need to create something like table 3..
i already have a query that has them all except for the count2 column, i don't know how to create that in query..
here's my code in query:
SELECT a.rn,'',a.id, b.iddesc…

user2458881
- 23
- 3
1
vote
3 answers
MS Access AutoNumber on Import
Just curious, when I imported data from a spreadsheet with 519 lines into an empty table, why did my autonumber keys start at 56,557,618? How big can this get? I don't want to end up running out of digits for my primary key field as I didn't even…

NickSentowski
- 820
- 13
- 27
1
vote
3 answers
Cutting off the 0's at the front of a record
This may be a basic question but I have no idea on how to word it in Google.
Basically, I have an Access database with Primary keys that are structured with this format ("02"000).
When I try to paste the number, it ignores the "02" and goes straight…

Pejman Poh
- 493
- 2
- 8
- 20
1
vote
1 answer
mySQL: Physical Sorting
Is there a way that I can sort table rows by a specified column (e.g. username), reassign its it's primary key values and then replace the table content with the sorted values?

Jhourlad Estrella
- 3,545
- 4
- 37
- 66
1
vote
9 answers
Is Access's AutoNumber (Increment) guaranteed to increment?
For a particular table, I have my ID field set to AutoNumber (Increment). If I add 5 rows to this table in quick succession, is each guaranteed to have a larger ID than the last? For instance, does autonumbering ever restart from 1 if some earlier…

Smashery
- 57,848
- 30
- 97
- 128