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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto generate a number

Status
Not open for further replies.

TopDawg

MIS
Mar 13, 2001
54
US

I need to auto generate a number. I am trying to log trouble call tickets and auto assign a number when I create a new ticket. ( Not the Primary key number) I need it to be 4 or 5 random unique numbers long.

Thanks in advance
 
Try this TopDawg,
this will generate a random number between 4 and 5 character long

Dim ticketValue
ticketValue = Int((100000 * Rnd) + 10000)

Good Luck

Faztech
:p
 
Opppps Sorry Topdawg put to many zeros in the random try between 10000 and 1000

Sorry

Faztech
:-D

 
Opppps Sorry Topdawg put to many zeros in the random try between 100000 and 1000

Sorry

Faztech
:-D

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top