Undefined function 'Mid' in expression error

G

Guest

I have a query that I am working on, SQL code is below, that gives me the "undefined function 'Mid' in expression" error. Mid is a "built-in" function...why is it undefined ??

UPDATE [CHARGE DETAIL] SET [CHARGE DETAIL].pat_first_name = Mid([pat_name],InStr(1,[pat_name],",")+1,IIf(InStr(InStr(1,[pat_name],","),[pat_name]," ")=0,Len([pat_name])-InStr(1,[pat_name],","),InStr(InStr(1,[pat_name],","),[pat_name]," ")-InStr(1,[pat_name],","))), [CHARGE DETAIL].pat_last_name = Left([pat_name],InStr(1,[pat_name]," ")), [CHARGE DETAIL].pat_middle = IIf(InStr(InStr(1,[pat_name],","),[pat_name]," ")>0,Right([pat_name],Len([pat_name])-InStr(InStr(1,[pat_name],","),[pat_name]," ")),"");

Thanks for any suggestions !
 
R

Roger Carlson

Check your References. In any code window, go to Tools > References... and
see if any of the checked items has a MISSING after it. Uncheck the
reference and close the window. This ususally corrects the problem. If you
still have problems, look here:
http://members.iinet.net.au/~allenbrowne/ser-38.html

--
--Roger Carlson
www.rogersaccesslibrary.com
Reply to: Roger dot Carlson at Spectrum-Health dot Org


I have a query that I am working on, SQL code is below, that gives me the
"undefined function 'Mid' in expression" error. Mid is a "built-in"
function...why is it undefined ??
UPDATE [CHARGE DETAIL] SET [CHARGE DETAIL].pat_first_name =
Mid([pat_name],InStr(1,[pat_name],",")+1,IIf(InStr(InStr(1,[pat_name],","),[
pat_name],"
")=0,Len([pat_name])-InStr(1,[pat_name],","),InStr(InStr(1,[pat_name],","),[
pat_name]," ")-InStr(1,[pat_name],","))), [CHARGE DETAIL].pat_last_name =
Left([pat_name],InStr(1,[pat_name]," ")), [CHARGE DETAIL].pat_middle =
IIf(InStr(InStr(1,[pat_name],","),[pat_name],"
")>0,Right([pat_name],Len([pat_name])-InStr(InStr(1,[pat_name],","),[pat_nam
e]," ")),"");
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top