find characters (1 Viewer)

adi32

Registered User.
Local time
Today, 22:24
Joined
Dec 6, 2000
Messages
82
i have a text field with "W XX" inside (XX=number)
ex "W 32 sbiuisd"
"W 25 isjoisjos"
"hihiqhw W 31 sbiqweuisd"
i want to have a querry that returns only the "W XX"
 

JimmyS

Registered User.
Local time
Today, 22:24
Joined
Apr 2, 2004
Messages
37
try

mid("W", 1, 4)

something like that?

**ok - just realised that won't help with any fields with another "w" in, sorry**
 

neileg

AWF VIP
Local time
Today, 22:24
Joined
Dec 4, 2002
Messages
5,975
Providing the W in "W XX" is always uppercase and W never appears in uppercase anywhere else in the field, the following will work:

Mid([TextField],InStr(1,[TextField],"W",0),4)

where TextField is the name of the field holding the text string.
 

Users who are viewing this thread

Top Bottom