how to make a auto advancing number cell in forms?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, I'm making an online "work order form" for my department's website. I
need an identifying work order "ID number", that automatically advances
after each submission of the form, i.e. 001, 002, 003, etc. How can I do
this?
 
This may work (and probably the easiest way) Let FP do the work using the DB
results/interface wizards:

If you're submitting the info to a database, a field called "ID" that is of
type "autonum" is created through the Frontpage wizard when you make the DB
connection based on your html form (if you open the database in MS access
table design view, you can see this). You can then access a record through
a query : results.asp?ID=x (where x is a record number).

Otherwise you need to code in a counter such as

Var RecordNum : Integer

RecordNum = 000
......

Then you write to the DB and after each record is written to the DB,
increment the counter:

RecordNum = RecordNum +1 in a Do While or Do For Loop etc and write this
number to each consecutive record.

I'm sure you can adapt ASP/VBscript code to do what you want or if you're
using MS Access Databases, create a field "recordNum" and make it of type
AutoNum.

and query the DB results.asp?RecordNum=X

I expect if you needed to you could put the leading zeros on the figure, but
the FP wizard just displays as "1", "2" etc.
 
Thank you very much. I'll give those a try.

Andrew Murray said:
This may work (and probably the easiest way) Let FP do the work using the DB
results/interface wizards:

If you're submitting the info to a database, a field called "ID" that is of
type "autonum" is created through the Frontpage wizard when you make the DB
connection based on your html form (if you open the database in MS access
table design view, you can see this). You can then access a record through
a query : results.asp?ID=x (where x is a record number).

Otherwise you need to code in a counter such as

Var RecordNum : Integer

RecordNum = 000
......

Then you write to the DB and after each record is written to the DB,
increment the counter:

RecordNum = RecordNum +1 in a Do While or Do For Loop etc and write this
number to each consecutive record.

I'm sure you can adapt ASP/VBscript code to do what you want or if you're
using MS Access Databases, create a field "recordNum" and make it of type
AutoNum.

and query the DB results.asp?RecordNum=X

I expect if you needed to you could put the leading zeros on the figure, but
the FP wizard just displays as "1", "2" etc.
 
Andrew, after reading your post again, this does not get entered into a DB,
it just gets emailed and placed on a confirmation page in the private folder
on the hosting server. Any ther suggestions? I thought about trying to make
this form in Excel and saving as a web page, but haven't found the right
formula to do it that way either. I've seen it done though. Thanks for your
help though.
 
Sorry, I can't think of another way to make an "order number" increment in
numerical sequence like you want if you're having the results
emailed.....there may be a way to do it but I'm not aware of any.

Perhaps a look on www.hotscripts.com you might find something?

The only way I can think of is as you receive the emails, you input these
into an Access Database, which can have an "autonum" field increment for the
job order, and some how have the DB available for your sales people or
whoever to bring up and view.
 
Back
Top