Thread: Instr help
View Single Post
  #1  
Old May 19th, 2010, 08:46 PM posted to microsoft.public.access
fhurman via AccessMonster.com
external usenet poster
 
Posts: 5
Default Instr help

Hello,

I've spent quite a bit of time in Excel using the SEARCH function to parse
out names from a text field thinking I'd be able to use this same expression
once I brought the data into Access. As I find out I guess I need to be
using the InStr function in Access but I'm still having a little trouble.

Here's an example of the text field : 00022956CTE/Smith,Harry
And here's an example of the SEARCH function I used in Excel which produced
"Harry": =+RIGHT(C2,LEN(C2)-SEARCH(",",C2,1))

When I try to run an Update query to a blank field with this in Access
replacing "SEARCH" with "InStr" I get a "Type conversion error" on all of the
records. Can anyone assist? I have a feeling I'm missing something fairly
obvious here.

Thanks!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/201005/1