Combining fields in a query

  • Thread starter Thread starter Twins
  • Start date Start date
T

Twins

Hey,

I have some problems combining 2 fields in a query.

For example: the first field is "1050-04" and the second field is "02".

However, when i try to combine these two the zero in the second field
disappears. So it reads "1050-042" but i want it to be "1050-0402". The
number 02 increases, so when it reaches 10+ it should be like
"1050-0410".

I can't seem to get it to work.
I hope someone can help me. Thanks in advance.
 
Is the 2nd field coming from a table? If so, do you have
it defined as a text field or a number field? If it's a
number field, you may have to play around to get the
leading 0 in your concatenation.
Something like this may help:
Concatfld:IIf([fld2]<10,[fld1] & "0" & [fld2],[fld1] &
[fld2])
 
Thought I posted a reply already, but I guess I didn't.
Try something like the following:

concatfld:IIF(fld2 < 10, fld1 & "0" & fld2, fld1 & fld2)
 
Back
Top