timmy Posted January 23, 2001 Posted January 23, 2001 I have a database of projects. Each project has a project number. I want each project of a given project number to have a unique number. So there would be records with project number 0101 and unique number 1, 2, 3 ,4, etc., Also projects with number 0102 would have unique numbers 1,2,3,etc., How in the world do I do this? Thanks in advance, you guys rock. Tim.
Keith M. Davie Posted January 24, 2001 Posted January 24, 2001 1. you could assign a serial number in your db.. 2. you could generate and assign a random alpha-numeric in your db. For 2., the basic calculation line to generate one random number is: Middle ("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", Int (Random* 36, 1) for two alpha-numerics: Middle ("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", Int (Random* 36, 1) & Middle ("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", Int (Random* 36, 1) For more add as many of these as needed: Middle ("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", Int (Random* 36, 1) & And you can alter the code to meet your needs. Peace Keith M. Davie
Recommended Posts
This topic is 8772 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now