Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting data in a string

Status
Not open for further replies.

SAWB

Technical User
Jan 11, 2001
26
I have a field in a MS access database called :{ItemNumber}.

It looks like this:
style colsz
Style being the overall style # of that product (variable size)
col is the color (always three letters)
sz is the size (usually two digits, but sometimes three)

I want to report as

Style Color Small medium large etc...
xyx red 4 6 8
black 2 9 7
abc yellow 10 3 5
green 0 9 10

how can I do this?

Thanks
 
You want to seperate data in the fields by using right, left, and mid functions. do this by adding a function
Style = left(itemstyle,5)
color = mid (itemstyle,6,3) (That is stating position and field length)
size is tricky because it can be 3 digits or 2, but the right fuction should be file if you make it 3, as long as it always starts in the same place.

for color you can select with if then else statements in a function
ex. formula: if (color = "gre") then formula = "green". Then print the formula as a field.

Good luck!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top