Results 1 to 1 of 1
  1. #1
    RonL is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Location
    NJ
    Posts
    114

    Invalid procedure call

    Could someone show me why I'm getting an "invalid procedure call" error (no error number) on the following:



    Code:
    SELECT Mid([tblAccountsTEST].[Account],InStr(1,[tblAccountsTEST].[Account],"qq"),6) AS Expr1
    FROM tblAccountsTEST, tblQuickenToAccess
    WHERE ([tblAccountsTEST].[Account] like Mid([tblQuickenToAccess].[AcctName],InStr(1,"'" & [tblQuickenToAccess].[AcctName] & "'","qq"),6) );
    The fields [Account] and [AcctName] are text. In case it matters, tblQuickenToAccess is linked to a text file.

    Thx, Ron

    EDIT - The following gives "data type mismatch in criteria expression" even though both fields are text.

    Code:
    SELECT Mid([tblAccountsTEST].[Account],InStr(1,[tblAccountsTEST].[Account],"qq"),6) AS Expr1
    FROM tblAccountsTEST, tblQuickenToAccess
    where  Mid([tblAccountsTEST].[Account],InStr(1,[tblAccountsTEST].[Account],"qq"),6) =  Mid([tblQuickenToAccess].[AcctName],InStr(1,[tblQuickenToAccess].[AcctName],"qq"),6)
    ;
    EDIT - Looks like I forgot to trap for null values. Concatenating the fields in the last query with "" seems to work. Still testing.
    Last edited by RonL; 05-16-2016 at 04:36 PM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Invalid Procedure Call error - MS Access
    By Saleem13 in forum Access
    Replies: 5
    Last Post: 10-23-2013, 11:36 AM
  2. Invalid Procedure Call or Argument
    By Trojnfn in forum Access
    Replies: 2
    Last Post: 10-29-2012, 01:44 PM
  3. Dedupe Query - Invalid Procedure Call
    By icarus in forum Queries
    Replies: 0
    Last Post: 12-07-2011, 08:49 AM
  4. Invalid Procedure Call
    By neo651 in forum Queries
    Replies: 21
    Last Post: 09-11-2011, 12:58 PM
  5. invalid procedure call
    By johnmerlino in forum Access
    Replies: 5
    Last Post: 12-13-2010, 10:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums