Record Selection

  • Thread starter Thread starter Dmario
  • Start date Start date
D

Dmario

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.
 
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.
 
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.
 
Back
Top