thenoisydrum
Registered User.
- Local time
- Today, 14:20
- Joined
- Jul 26, 2012
- Messages
- 52
Bonjour,
I need to select the second word from a product description.
Here are two examples;
2156015 Dunlop SP-30
1756514 Goodyear Sport
I found the correct code on another website to do this in Excel;
=MID([field], FIND(" ",[field],1)+1, FIND(" ",[field],FIND(" ",[field],1)+1)-(FIND(" ",[field],FIND(" ",[field],1))))
It works a treat.
In order for it to work in Access you apparently change FIND to Instr.
Now this worked for the person on the other forum but when I try it, it doesn't and I get the #Error returned.
Here is what I am using. Description is obviously the field I am selecting from;
TEST: Mid([Description],InStr(" ",[Description],1)+1,InStr(" ",[Description],InStr(" ",[Description],1)+1)-(InStr(" ",[Description],InStr(" ",[Description],1))))
Where am I going wrong?
I need to select the second word from a product description.
Here are two examples;
2156015 Dunlop SP-30
1756514 Goodyear Sport
I found the correct code on another website to do this in Excel;
=MID([field], FIND(" ",[field],1)+1, FIND(" ",[field],FIND(" ",[field],1)+1)-(FIND(" ",[field],FIND(" ",[field],1))))
It works a treat.
In order for it to work in Access you apparently change FIND to Instr.
Now this worked for the person on the other forum but when I try it, it doesn't and I get the #Error returned.
Here is what I am using. Description is obviously the field I am selecting from;
TEST: Mid([Description],InStr(" ",[Description],1)+1,InStr(" ",[Description],InStr(" ",[Description],1)+1)-(InStr(" ",[Description],InStr(" ",[Description],1))))
Where am I going wrong?