[mso] Re: Formatting a concatenated field

Hi Cathy,

I'm pretty sure this was covered in answers to a question by Glenda a
short while ago.
Because you enclose the "fields" in brackets I think you are talking
about Access.
I can't remember the final answer but FWIW I would do something
like...

[order number]&"-"&right$("0000" & trim$(str$([mrrno])),4)

The str$ would change the number to a string but I think it adds a
leading space... not sure.
The trim$ would remove the leading space if it's there :-)
Then the "0000" adds "0000" to the front.
Finally the right$(...,4) would return the last 4 characters.

Others who looked at Glendas problem have a simpler way I think.

HTH
Regards
Lisa

> -----Original Message-----
> From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx]On
> Behalf Of Cathy.Evans@xxxxxxxxx
> Sent: 29 January 2004 20:35
> To: mso@xxxxxxxxxxxxx
> Subject: [mso] Formatting a concatenated field
>
>
>
>
> I have a concatenated field as follows: [order
> number]&"-"&[mrrno]. The
> [mrrno] comes from a numeric field formatted as 0000 so it
> will show 0001,
> 0002, instead of 1, 2, etc. The [order number] field is
> alphanumeric. They
> are concatenated in order to form a unique key for certain
> filtering I
> need, however, the result looks like '1234xx5678-1'. I want
> it to look like
> '1234xx5678-0001'. Can I force the 0000 format on the
> [mrrno] to show in
> the final concatenated result?
> Thank you!


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: