If you ever built an sql string from code you might have tripped over some problems with dates and numbers with decimal points especially when you aren't using a us locale or even worse have your application deployed on different locales. The mvps website has some solutions for that but they weren't working completely reliable for me. For anyone interested I just post the functions I made for that reason here:

Function EscapeSQLParameter( _
    ByVal vParameter As Variant) _
    As String
' This function converts the usual vb data types in
' string compatible with jet sql. You should cast the
' parameter explicitely to the data type you want it
' to have (e.g. when you read out a date from an edit
' box you need to cast it to date with cdate(myfield)
' as it's otherwise string type which will result in
' wrong handling
    Dim strBuffer As String
    Dim lngSeperatorPos As Long
    Dim strDecPoint As String
    Dim parType As VbVarType
    parType = VarType(vParameter)
    Select Case parType
        Case vbNull
            Err.Raise 94 'invalid usage of null
        Case vbObject
            Err.Raise 443 'object has no default value
        Case vbByte, vbInteger, vbLong
            strBuffer = CStr(vParameter)
        Case vbCurrency, vbDecimal, vbSingle, vbDouble
            strBuffer = CStr(vParameter)
            strDecPoint = Format(0, ".")
                'get the 'decimal point character'
                'of the current locale
            If strDecPoint <> "." Then
            'on systems with european locale the , has to be
            'replaced with a . (or if the decimal point is any
            'other than . in the locale)
            'the format as well as the cstr() function obey regonal settings
            'when converting thus a plain character substitution is used here
            'this won't apply to us locales
                lngSeperatorPos = InStr(1, strBuffer, strDecPoint)
                If lngSeperatorPos > 0 Then
                    strBuffer = Left(strBuffer, lngSeperatorPos - 1) & "." & _
                        Right(strBuffer, Len(strBuffer) - lngSeperatorPos)
                End If
            End If
        Case vbDate
            'converting to double seems to be the
            'safest way for jet workspaces
            strBuffer = EscapeSQLParameter((CDbl(vParameter)))
        Case vbString
            strBuffer = "'" & EscapeSQLString(vParameter) & "'"
        Case Else
            Err.Raise 13 'type mismatch
    End Select
    EscapeSQLParameter = strBuffer
End Function
Function EscapeSQLString( _
    ByVal Text As Variant) As String
'by John DeHope

Dim x

If IsNull(Text) Then
    EscapeSQLString = ""
    x = 1
    Do While x <= Len(Text)
        If Mid(Text, x, 1) = "'" Then
            Text = Left(Text, x - 1) & "''" & Right(Text, Len(Text) - x)
            x = x + 2
            x = x + 1
        End If
    EscapeSQLString = Text
End If
End Function
It is designed for Jet SQL only so you might need to modify it if you wanna build pass-through queries.

Hope this helps some of you

Michael Apel