Advertisement

11.19.2007 at 02:50AM PST, ID: 22969716
[x]
Attachment Details

Auto increment code in an Access Query field

Asked by openaccount in Microsoft Access Database, SQL Query Syntax

Tags: access, query, increment, field

Hi,

I have this question regarding autoincrement. I know Access already has an autoincrement option for a number field but the problem is that if I delete a record then when you add another record it will just continue the number after the deleted record.

e.g.

if we add a record and the number is 1 but we decided that record then place another one we want it to still be 1 and not 2. What we want is to convert a normal field to an autonumber field. this is the formula

<previous record> + 1

e.g.

1
next record will be <previous record> + 1 so 1+1 = 2
next record will be <previous record> + 1 so 2+1 = 3
next record will be <previous record> + 1 so 3+1 = 4
etc...

Hope this makes

ThanksStart Free Trial
 
Loading Advertisement...
 
[+][-]11.19.2007 at 03:02AM PST, ID: 20311480

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.19.2007 at 03:11AM PST, ID: 20311508

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.19.2007 at 03:26AM PST, ID: 20311552

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.19.2007 at 03:27AM PST, ID: 20311555

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.19.2007 at 05:44AM PST, ID: 20312270

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.19.2007 at 08:07PM PST, ID: 20317533

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.20.2007 at 12:39AM PST, ID: 20318339

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, SQL Query Syntax
Tags: access, query, increment, field
Sign Up Now!
Solution Provided By: peter57r
Participating Experts: 3
Solution Grade: A
 
 
[+][-]11.20.2007 at 12:51AM PST, ID: 20318374

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628