Newbies TomH Posted July 2, 2009 Newbies Posted July 2, 2009 This seems to be beyond my skill set. I'm attempting to auto generate a client number based on the following criteria: First letter of first name Last letter of last name M or F for gender Two digit month of birth Two digit date of birth Last three digits of birth year Last four digits of SSN The fields I have are: NameFirst NameLast Gender DOB (date formatted XX/XX/XXXX) SSN ClientNumber (the field I need calculated) If the client information is Sally Jones ,05/19/1965, XXX-XX-1234 the client number is: SSF05199651234 Is there any way to do this in a calculation? Tom
comment Posted July 2, 2009 Posted July 2, 2009 This is very easy to do - but utterly worthless for any purpose I can think of: Left ( NameFirst ; 1 ) & Left ( NameLast ; 1 ) & Gender & SerialIncrement ( "0000000" ; 100000 * Month ( DOB ) + 1000 * Day ( DOB ) + Mod ( Year ( DOB ) ; 1000 ) ) & Right ( SSN ; 4 )
Lee Smith Posted July 2, 2009 Posted July 2, 2009 (edited) I agree that this information would have limited use. There is an error in the LastName caluculation, the OP wanted Right one Charater, and Upper. I amended your calc Left ( FirstName ; 1 ) & Upper (Right ( LastName ; 1 ) ) & Gender & SerialIncrement ( "0000000" ; 100000 * Month ( DOB ) + 1000 * Day ( DOB ) + Mod ( Year ( DOB ) ; 1000 ) ) & Right ( SSN ; 4 ) HTH Lee Edited July 2, 2009 by Guest
Newbies TomH Posted July 3, 2009 Author Newbies Posted July 3, 2009 Thank-you for your quick replies, I see where I was going wrong now. I agree that this is a nonsense number, however it is required by the state. My tax dollars at work. Tom
Recommended Posts
This topic is 5620 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