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!

AUTONUMBER 1

Status
Not open for further replies.

chubby

Programmer
Apr 28, 2001
278
0
0
US
I have a report that I need a complex autonumber issue to the end user after he/she puts in a troublecall. Is there an easy way to just make autonumber system output:
100-1
100-2
100-3
or
1001-1
1002-1
1003-1
or
any number combo with a dash in between the last number?

 
The simple answer is NO

But there is a way of making it appear to the user that it is doing so.
Use TWO fields
FieldA is the real auto-number, start with 1001 and it will increment from there
FieldB holds the suffix that you need to generate programatically

The concatenate them together on forms and reports.


HOWEVER, the purists ( pedants ) amongst us ( & I'm usually one of that number - so I'm not being derogatory ) would say that if users are going to see the primary key, and it's sequence / contents actually contains information ( which an auto-number does not ) then you should generate it yourself anyway. In that case you can develop whatever format you like, But the two field primary key format, as mentioned above, sounds like your easiest solution.


'ope-that-'elps.


Let the system generate your

G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top