Re: Calculated Field
- From: John Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 28 Nov 2005 22:24:59 -0700
On 28 Nov 2005 21:12:53 -0800, "rech340" <rech340@xxxxxxxxxxx> wrote:
>Hi,
>
>I have a query with a calculated field called Export.
>
>Export looks like this: Export: "IWTP" & "-" & [CourseID] & "-" &
>[VendorID]
>
>The CourseID is a 4-digit autonumber field with a format of 0000, and
>VendorID is 3-digit autonumber field with a format of 000. They work
>fine when you're looking at individual field in the query. It's when I
>put them together in Export calculated field, it drops the leading
>zeros from CourseID and VendorID. I have tried everything to get this
>to work.
>
>Any help is greatly appreciated.
Try using the Format() function to explicitly set the displayed size:
Export: "IWTP-" & Format([CourseID], "0000") & Format([VendorID],
"\-000")
I'm saving a couple of quoted strings by including the first hyphen in
the text string, and the second as a literal value in the Format.
John W. Vinson[MVP]
.
- Follow-Ups:
- Re: Calculated Field
- From: rech340
- Re: Calculated Field
- References:
- Calculated Field
- From: rech340
- Calculated Field
- Prev by Date: Calculated Field
- Next by Date: Re: Calculated Field
- Previous by thread: Calculated Field
- Next by thread: Re: Calculated Field
- Index(es):
Relevant Pages
|
|