+ Reply to Thread
Results 1 to 9 of 9

Runtime Error '3075': Syntax error in the string in the query expression [SQL]

  1. #1
    Registered User
    Join Date
    05-28-2020
    Location
    brasil
    MS-Off Ver
    2016
    Posts
    8

    Exclamation Runtime Error '3075': Syntax error in the string in the query expression [SQL]

    Runtime Error '3075': Syntax error in the string in the query expression "", ").
    This error gives time to save a name in the register.



    Please Login or Register  to view this content.
    Please use code tags when posting code --Moderator
    Last edited by 6StringJazzer; 05-28-2020 at 10:23 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,719

    Re: Runtime Error '3075': Syntax error in the string in the query expression

    The string you are building ends like this, which I think is giving you the error. You have a null value that SQL is not expecting:

    'TextObsValue','')"

    Change your last two lines of code from this
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Runtime Error '3075': Syntax error in the string in the query expression [SQL]

    Your lines are putting ' before and after sql, so you have too many ' because every string will be ''value',''value' etc. Also your second last sql = should not add "','" because there is no value after it...

    Please Login or Register  to view this content.
    should be:

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,719

    Re: Runtime Error '3075': Syntax error in the string in the query expression [SQL]

    Based on the above comments:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Runtime Error '3075': Syntax error in the string in the query expression [SQL]

    @6StringJazzer thanks for the rep Very kind of you.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,719

    Re: Runtime Error '3075': Syntax error in the string in the query expression [SQL]

    Quote Originally Posted by Arkadi View Post
    @6StringJazzer thanks for the rep Very kind of you.
    Well deserved! I caught the problem at the end but not the one in every other line!

  7. #7
    Registered User
    Join Date
    05-28-2020
    Location
    brasil
    MS-Off Ver
    2016
    Posts
    8

    Re: Runtime Error '3075': Syntax error in the string in the query expression [SQL]

    Valeu.. Deu certo, Muito obrigado.

  8. #8
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Runtime Error '3075': Syntax error in the string in the query expression [SQL]

    Com prazer please remember to mark the thread as solved leegrj

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,719

    Re: Runtime Error '3075': Syntax error in the string in the query expression [SQL]

    Quote Originally Posted by leegrj View Post
    Valeu.. Deu certo, Muito obrigado.
    If your question has been answered please mark your thread as "Solved" so that members will know by looking at the thread title that your problem is solved. Go to the menu immediately above your first post to the thread and click on Thread Tools. From the dropdown menu select "Mark this thread as solved..."

    If a member helped you solve your problem, consider adding to their reputation by clicking on the star icon addreputationiconsmall.jpg below their name.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Syntax error in date in query expression "#".
    By baijixu in forum Access Tables & Databases
    Replies: 3
    Last Post: 06-12-2014, 11:05 PM
  2. [SOLVED] Syntax error (Missing operator) in query expression
    By lengwer in forum Access Tables & Databases
    Replies: 2
    Last Post: 08-22-2013, 04:00 PM
  3. Syntax Error in Query Expression
    By acmagyar in forum Access Programming / VBA / Macros
    Replies: 0
    Last Post: 07-12-2013, 03:11 PM
  4. [SOLVED] Compile Error: Expected Expression, Syntax Error
    By gjohn282 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2012, 11:28 PM
  5. Syntax Error (missing Operator) in query expression
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-25-2011, 11:59 AM
  6. runtime error: syntax error or access violation
    By oucsester in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2006, 12:55 PM
  7. [SOLVED] Syntax error (missing operator) in query expression '6 Wescott Rd#
    By shealy in forum Excel General
    Replies: 0
    Last Post: 06-09-2005, 05:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1