Steve,
In your openeing macro:
sel max(auto_num_colname) into maxno from tablename
set var maxno = (.maxno + 1)
autonum auto_num_colname in tablename using .maxno 1 nonum

This will reset your auto number to the next one when you start a new
session regardless of how many you used by entering a form and not using it.

Bernie Lis
Megabytes, Inc.
----- Original Message -----
From: "Steve Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 20, 2002 2:37 AM
Subject: Auto Number


> To All:
>
> I have created a simple application that stores permit data in one
> table.  Other tables exist as look-up tables to fill in repetitive alpha
> data in the input form using numerical codes. The input form has an
> autonumber column that generates a sequential id number. On completion of
> the last field of the form, pressing the "enter" key obviously brings up a
> new blank form with a incremented id number. Works great, especially when
> one enters 50 to 100 forms in a single session.  The only problem is that
> if you entered the form by mistake, the autonumber column increments. Even
> though you exit with "discard row" the autonumber remains incremented as
> expected.  The work around is to remember to exit the last instance of
> completing the form with "esc" and "save".  Not very elegant, but it
works.
> Now I am going to guess that it is bad form to bring up a new form without
> asking if you want to enter another form each time. I am sure there is a
> better way to control autonumber more effectively.  And I want to minimize
> the additional keystrokes needed on a repetitive basis to prevent
instances
> of an unwanted incremented autonumber column. Suggestions?
>
>
> Steve


================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to