# How do you auto increment a field when submitting a web form?

**URL:** https://forum.kirupa.com/t/how-do-you-auto-increment-a-field-when-submitting-a-web-form/255360
**Category:** Uncategorized
**Created:** [March 21, 2008, 4:25pm UTC](https://forum.kirupa.com/t/how-do-you-auto-increment-a-field-when-submitting-a-web-form/255360 "2008-03-21T16:25:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![danharris86](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@danharris86](https://forum.kirupa.com/u/danharris86)
#### Post date: [March 21, 2008, 4:25pm UTC](https://forum.kirupa.com/t/how-do-you-auto-increment-a-field-when-submitting-a-web-form/255360/1 "2008-03-21T16:25:07Z")

</div>

I am using asp and dreamweaver 8, when I add a record to the database I would like it to automatically add the next largest number as the userID in my table…I have set it up so that a the other records are created, but the user id is a primary key field and I do not know how to make it add the next highest value (which will therefore avoid duplicates)

Can anybody offer any help?
