From: Dmario on
I am working with a part number that is 10-11 alpha numeric characters. I
need to focus on the 8th character which represents the color of the item and
make a selection as to the color.

I started looking at the "Like" function, but couldn't figure out how to
have it look at the 8th character only.

I am using Access 2000.

Any help would be appreciated.
From: fredg on
On Thu, 8 Apr 2010 13:51:02 -0700, Dmario wrote:

> I am working with a part number that is 10-11 alpha numeric characters. I
> need to focus on the 8th character which represents the color of the item and
> make a selection as to the color.
>
> I started looking at the "Like" function, but couldn't figure out how to
> have it look at the 8th character only.
>
> I am using Access 2000.
>
> Any help would be appreciated.

ColorChar:InStr([PartNumber],8)

will return the 8th character.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
From: John W. Vinson on
On Thu, 8 Apr 2010 13:51:02 -0700, Dmario <Dmario(a)discussions.microsoft.com>
wrote:

>I am working with a part number that is 10-11 alpha numeric characters. I
>need to focus on the 8th character which represents the color of the item and
>make a selection as to the color.
>
>I started looking at the "Like" function, but couldn't figure out how to
>have it look at the 8th character only.
>
>I am using Access 2000.
>
>Any help would be appreciated.


A couple of ways.

Mid([partnumber], 8, 1)

will return the 8th character from the string; or you can in fact use Like:

LIKE "???????" & [Enter color code:] & "*"

will prompt for a one-character color and find records containing that value
as the 8th byte.
--

John W. Vinson [MVP]