Results 1 to 2 of 2
  1. #1
    jscriptor09 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    60

    comma in a query

    Hi folks
    In Europe, the decimal seperator is "," as in 2500,35.  In the US and several other parts of the world it is a "." as in 2500.35

    the value is a double.

    so for a query like this "Select x from y where z-" & thePrice & ".....

    with PC Regional set to France, thePrice is 2500,35.

    The query fails.

    if I change to 'thePrice' I get an error of missmatch type.
    Any idea how to deal with this issue? and get the query to work?
    Thanks
    Mike

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,960
    Maybe need to double the comma so it will be accepted by the SQL as literal character. That works with apostrophes.

    "Select x from y where z=" & Replace(thePrice, ",", ",,") & "

    Is this web page coding (& suggests that)?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Comma Delimited List Query/Report
    By scrapyard in forum Queries
    Replies: 3
    Last Post: 01-20-2012, 07:06 AM
  2. Replies: 1
    Last Post: 11-30-2011, 01:13 AM
  3. Replies: 6
    Last Post: 06-26-2011, 12:15 AM
  4. Syntax error (comma) in query expression?
    By TheWolfster in forum Queries
    Replies: 5
    Last Post: 05-10-2010, 12:02 PM
  5. Syntax error (comma) in query expression
    By KLynch0803 in forum Programming
    Replies: 3
    Last Post: 01-18-2010, 03:35 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