Concatenate Question (1 Viewer)

razorking

Registered User.
Local time
Yesterday, 17:51
Joined
Aug 27, 2004
Messages
332
Hoping someone can help me with this:

I have a table with two fields that I am wanting to concatenate. The two fields are: Order and Line#. The line numbers are sequential by tens, like this:
10, 20, 30...etc.

So I have order lines that are from two to four digits. Like this:
20
120
1020

All order numbers are six digits. I want to concatenate the order and line (easy to do) my problem is I want to append zeros in front of any line number less than four digits. For example, using the lines above and an order number of 111111 I want the result of the concatenation to be like this:
1111110020
1111110120
1111111020

Sorry to ask...but I don't know how to do it.

Thanks for looking!
 
I'm no expert but the easiest way would be to change your line numbers to a Text field and change them to be 0010, 0020 etc?
 
Try the Format() function.

NewNumber: [Order] & Format([Line#],"0000")

^
 
EMP said:
Try the Format() function.

NewNumber: [Order] & Format([Line#],"0000")

^


Exactly what I was looking for...thank you very much!
 

Users who are viewing this thread

Back
Top Bottom