+ Reply to Thread
Results 1 to 7 of 7

Syntax Error (missing Operator) in query expression

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Syntax Error (missing Operator) in query expression

    Hello everyone.

    This problem (or error) involves some minor SQL programming. However the coding is done in and Excel '97 enviroment and involves an Excel userform.

    So, I have a syntax error that is occuring after I attempted to insert two new string items into a string variable called strVol.The two additional items are SubPort and PartialMargin.

    Let me first walk you through the userform:

    1. The user is requested to Add Volume -

    Please Login or Register  to view this content.
    A frame that was hidden on the userform then appears and the user populate the various fields namely: Port, SubPort, Product, Volume and then Margin. The user than "Saves The Volume"

    Please Login or Register  to view this content.
    Now According to the immediate window:

    Please Login or Register  to view this content.
    which is correct, here CARRIBEAN is an example of a Port and AGUSTA a subport and so fourth. I suspect the double and single qoutes around PartialVolume and PartialMargin are incorrect.
    Last edited by AnthonyWB; 01-25-2011 at 12:00 PM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Syntax Error (missing Operator) in query expression

    You have mismatched single quotes. There should be one after 'CARIBBEAN and I suspect there should not be one before the 1000 as the second last value.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Re: Syntax Error (missing Operator) in query expression

    Romperstomper

    I cannot seem to find the right place to add the sinlge quote around Port (e.g.Carribean)?

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Syntax Error (missing Operator) in query expression

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

  5. #5
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Re: Syntax Error (missing Operator) in query expression

    Thanks Romperstomper but the error persists:

    Please Login or Register  to view this content.
    I appear to now be missing a sinlge qoute around product for example "Low SULFUR FO is missing a single qoute.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Syntax Error (missing Operator) in query expression

    Well, then you need to put it back since it was there before!

  7. #7
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Re: Syntax Error (missing Operator) in query expression

    Thanks, I put it back, now I have others, so I continue and move on.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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