Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SCRIPT FOR 4.5 1

Status
Not open for further replies.

997

MIS
Mar 26, 2001
1
US
I HAVE A LONG LIST AND I WOULD LIKE TO ADD THE ITEM NUMBER AUTOMATICALLY THRU A SCRIPT

EXAMPLE [ITEM] = X
ITEM= X+1

WHICH WILL THEN GIVE ME

ITEM
1
2
3
ETC

I DO NOT SEEM TO BE ABLE TO PUT IT TOGETHER.

MAYBE SOMEONE CAN HELP

THANK YOU
CALOG
 
Possibly during the NewRecord event, you could attach a tcursor to your table, then do a cMax on the tcursor and assign that value + 1 to your key field.

Rose/Miros
 
Calog,

I guess this list is in a table? If so, a quick way is something like

CoEdit "Table"
SCAN ; loops through every record
[Item No] = RECNO() ; sets itemNo to the record number
ENDSCAN

DO_IT!

This will give the items in your table numbers 1...100... etc. You could sort the table first to get them alphabetical or whatever.

Phil


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top