New string from a part of another string

testdba

Registered User.
Local time
Today, 17:28
Joined
Dec 16, 2004
Messages
26
I am trying to create a product code based on the text that is in several different text boxes. I have a product name (W22) a manufacturer (Stuff Manufacturing Inc.) and a product type (Wiget). I would like for the product code to be a combination of parts of all three. The result, for example, would be something like W22STFWIDG. I really have no idea how to take only part of the text (say the first two letters and the fourth letter of a textbox) and combine it with the other text boxes. Any suggestions would be appreciated.

Thanks for the help.
-Tim
 
Useful functions to look for in the Access Help Files:

Left()
Mid()
Right()
InStr()

That should start you off in the right direction. ;)
 
try as follow:

Code:
dim strRes as String, strMan as String

strMan = Left(me!manufacturer,2) & Mid(me!manufacturer,4,1)
strRes = Ucase(me![product name]) & Ucase(strMan) & Ucase(Left(me![product type],4))
 
Thanks, it worked

Hey thanks guys, that's exactly what I was looking for.
 

Users who are viewing this thread

Back
Top Bottom