Barcode help

sroot

Registered User.
Local time
Yesterday, 22:29
Joined
Mar 18, 2013
Messages
53
I have a report that prints off a bar-code for the user to be able to scan it to the system. It works great except one issue the bar-code has to be 9 digits long (a R followed by 8 numbers) the problem is that the user types in whatever number they have, it could be 8 or it could be 7. I need to add a 0 after the R to make it work... but it wont work if there are 8 number already since that would make it to long... Here is what i have
Code:
=Trim("*M") & Trim([plate]) & Trim("*")
that works for it if it is 8 numbers but not 7. I can use
Code:
=Trim("*M0") & Trim([plate]) & Trim("*")
but that only works if it is 7 numbers... Any ideas? Thanks for the help!
 
Sorry that is an old copied one, it use to be M but it was changed to an R
 
So [plate] should return 8 characters? And are the asterisk part of the count?
 
The asterisk are so the system will read the code. They press the button and it will ask for the plate number and that is where they will put in whatever it is. but if they put in 7777777 it needs to display on the barcode as *R07777777*
 
Ok. Easily done:
Code:
=Trim("*M") & String(8-Len(Trim([plate])), "0") & Trim([plate]) & Trim("*")
 
Last edited:
That worked great! Thanks so much!!!!
 

Users who are viewing this thread

Back
Top Bottom