From: Alice Holbrow on
I'm not well-versed in Access, and I'm hoping someone can give me a
simple fix for my dilemma. I want to create a new field (NewID) in a
table that looks up the data in a different field (CurrentID) in that
same table and then drops the first character.

So if the value in CurrentID is 012345, the value in New ID will be
12345
if the value in Current ID is 022345, the value in New ID will be
22345.

Any help will be greatly appreciated!

Thanks,
aj
From: Jeff Boyce on
Alice

I'll suggest that, rather than redundantly storing a fact you already have,
consider using a query to retrieve what you're after.

Look into using either a Format() function or something like the Mid() or
Right() functions.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Alice Holbrow" <techwriterajh(a)gmail.com> wrote in message
news:78e9ad8f-66c9-4e09-9a6f-8b8448141206(a)37g2000yqm.googlegroups.com...
> I'm not well-versed in Access, and I'm hoping someone can give me a
> simple fix for my dilemma. I want to create a new field (NewID) in a
> table that looks up the data in a different field (CurrentID) in that
> same table and then drops the first character.
>
> So if the value in CurrentID is 012345, the value in New ID will be
> 12345
> if the value in Current ID is 022345, the value in New ID will be
> 22345.
>
> Any help will be greatly appreciated!
>
> Thanks,
> aj


From: John W. Vinson on
On Thu, 13 May 2010 14:58:40 -0700 (PDT), Alice Holbrow
<techwriterajh(a)gmail.com> wrote:

>I'm not well-versed in Access, and I'm hoping someone can give me a
>simple fix for my dilemma. I want to create a new field (NewID) in a
>table that looks up the data in a different field (CurrentID) in that
>same table and then drops the first character.
>
>So if the value in CurrentID is 012345, the value in New ID will be
>12345
> if the value in Current ID is 022345, the value in New ID will be
>22345.
>
>Any help will be greatly appreciated!
>
>Thanks,
>aj

YOu cannot do this in a table, and as a rule you shouldn't do it at all! If
NewID is derived from CurrentID, you can do it in a *query*. Assuming that
CurrentID is a Text field (not a number) and that you want to blindly discard
the first character, whatever it is (e.g. 512345 and 012345 and 912345 all
become 12345), the calculated field would be

NewID: Mid([CurrentID], 2)

Perhaps you could explain the context, why you're doing this, and what you'll
be doing with the result - there may be a better solution.
--

John W. Vinson [MVP]