Concatination problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rob

    Concatination problem

    In a table the "TestID" is PK is AutoNumber and format is set "000" so
    to display leading zeros for numbers less than 100. I have the next field
    is for "TestDate" and format is ShortDate. In a query I want to want to
    concatenate these two fields with "-" separating them e.g 065-08/08/08 to
    generate a Job Number.
    In the query I have built "JobNum:[TestID]&"-"&[TestDate] and I get
    result without leading zeros. e.g. "65-08/08/08"

    How do I build this so that the "TestID" is converted to text first and
    give "065-08/08/08"



    --
    With Thanks, Rob
  • fredg

    #2
    Re: Concatination problem

    On Tue, 14 Oct 2008 20:52:46 GMT, Rob wrote:
    In a table the "TestID" is PK is AutoNumber and format is set "000" so
    to display leading zeros for numbers less than 100. I have the next field
    is for "TestDate" and format is ShortDate. In a query I want to want to
    concatenate these two fields with "-" separating them e.g 065-08/08/08 to
    generate a Job Number.
    In the query I have built "JobNum:[TestID]&"-"&[TestDate] and I get
    result without leading zeros. e.g. "65-08/08/08"
    >
    How do I build this so that the "TestID" is converted to text first and
    give "065-08/08/08"
    obNum:Format([TestID],"000") &"-"& Format([TestDate] ,"mm/dd/yy")
    --
    Fred
    Please respond only to this newsgroup.
    I do not reply to personal e-mail

    Comment

    Working...