Tenchi Posted September 4, 2001 Posted September 4, 2001 I have a db: Employment Oppurtinities, that allows a user to create a Job Order and then view eligible candidates (Full-time, Part-time, Both) in a portal. I want to assign a unique identifier (JobOrderCode) to each order that I can in turn assign to candidates meeting that order's criteria. To keep it simple, I want to combine the order date and the record number into a text value. I tried this calculation: JobOrderCode NumToText(Month(Order Date)) + NumToText(Day(Order Date)) + NumToText (Year (Order Date)) + (@@) where (@@) should be the record number (i.e. 5) thinking that September 4, 2001 (record 5) would become 9420015 However, the calculation does not accept (@@), and [NumToText(Month(Order Date)) + NumToText(Day(Order Date)) + NumToText (Year (Order Date))] returns a 4 digit number (i.e. 9/4/2001 becomes 2014). I thought that using NumToText(xx(Order Date)) would convert the numeric values to text and prevent their being added together. What have I missed?
Olive Posted September 4, 2001 Posted September 4, 2001 Hi, Here's what I would do : 1- don't use NumToText 2- instead of using the "+" sign, use the "&" sign Your calc is then : Month(Order Date) & Day(Order Date) & Year (Order Date) & @@ I think it should work... Does it ?
Olive Posted September 4, 2001 Posted September 4, 2001 Hi, Here's what I would do : 1- don't use NumToText 2- instead of using the "+" sign, use the "&" sign Your calc is then : Month(Order Date) & Day(Order Date) & Year (Order Date) & @@ I think it should work... Does it ?
Afeina Posted September 4, 2001 Posted September 4, 2001 Try it this way: Status( CurrentDate ) & Status( CurrentRecordID ) This should give you what you are looking for. Good Luck, Martin Wiedemann
Tenchi Posted September 4, 2001 Author Posted September 4, 2001 quote: Originally posted by Afeina Software: Try it this way: Status( CurrentDate ) & Status( CurrentRecordID ) This should give you what you are looking for. Good Luck, Martin Wiedemann Thanks Martin; Status(CurrentRecordID) creates great index values! I thought I was going to have to find a way to create "000xx" or some such values to append to the date values.
Kurt Knippel Posted September 4, 2001 Posted September 4, 2001 I use right("000000" & status ( currentrecordID ), 6 ) & "-" & right("000000" & status ( currenttime ), 6 ) & "-" & right("000000" & status ( currentdate ), 6 ) This gives you a nice unique semi-random meaningless 20 character ID. Virtually impossible to break.
Recommended Posts
This topic is 8485 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