Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Syntax error (2002)

    I'm getting Syntax error (missing operator) when running the following inside a SQL string in VB Code:

    StrConv([RANK] & "" "" & [FNAME] & "" "" & IIf(IsNull([MI]),"""",[MI] & "". ""),3) & "" & StrConv([LNAME] & "" XXX XX "" & Right([SSN],4),1) & ""/"" & [MOS] & "" "" & IIf([orders_type]=""RESERVIST"",""USMCR"",""USMC"") AS FULLNAME
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What's more, you deserve to be hacked." -Richard Clarke

  2. #2
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Syntax error (2002)

    After a slower look and better read-through, I fixed it by changing this:

    StrConv([RANK] & "" "" & [FNAME] & "" "" & IIf(IsNull([MI]),"""",[MI] & "". ""),3) & <span style="background-color: #FFFF00; color: #000000; font-weight: bold">""</span hi> & StrConv([LNAME] & "" XXX XX "" & Right([SSN],4),1) & ""/"" & [MOS] & "" "" & IIf([orders_type]=""RESERVIST"",""USMCR"",""USMC"") AS FULLNAME

    to this:

    StrConv([RANK] & "" "" & [FNAME] & "" "" & IIf(IsNull([MI]),"""",[MI] & "". ""),3) & <span style="background-color: #FFFF00; color: #000000; font-weight: bold">""""</span hi> & StrConv([LNAME] & "" XXX XX "" & Right([SSN],4),1) & ""/"" & [MOS] & "" "" & IIf([orders_type]=""RESERVIST"",""USMCR"",""USMC"") AS FULLNAME
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •