problem concatenating two fields

helenpostle

Registered User.
Local time
Today, 17:15
Joined
Jan 28, 2002
Messages
17
I have a query where I want to joing two fields "jobNo" and "sampleNo" to make "sampleid". The format of sampleNo is set to add leading zeros if the number is less than 4 in length, ie 1 becomes 0001. The trouble is, when I join the two fields 0001 becomes 1 again so abc/1234 and 0001 becomes abc/1234/1 instead of abc/1234/0001. I'm not sure how to make it keep the zero's in and would appreciate some help.

Helen
 
Without looking into it, convert the number to a string before concatenating.
 
Oh what a good idea, that is definately the easiest way, thanks a lot

Helen
 
Use the Format() function in the query.

jobno & Format(sampleNo,"0000") As SampleId
 

Users who are viewing this thread

Back
Top Bottom