ps
if you want to eliminate " in the search string, you can do this:
'~~~~~~~~~~~~
if instr(sKeyWord, """") > 0 then
sVariable = trim(replace(sKeyWord, """",""))
end if
'~~~~~~~~~~~~
remember to put two " in a string delimited with "
~crystal
On 2/4/2019 10:42 AM, crystal 8 strive4peace2008@yahoo.com
[MS_Access_Professionals] wrote:
> hi Valentino,
>
> you can use Instr to search for quotes, and then Replace " with "" if it
> has them
>
> ~crystal
>
> On 2/4/2019 1:24 AM, Valentino Avvisati valentino.avvisati@gmail.com
> [MS_Access_Professionals] wrote:
>> Dear all,
>> I need your help.
>> I have a procedure that select some records based on a query created with vba
>> The procedure take one variable string like
>> "Flower"
>> And extract the records that has "flower" in one specific fields.
>> Sometimes the string had some character that are also key word in sql string Like: flower "
>> This create problem in the procedure since """ is Not considered part of the string but part of sql command
>> Is there any possibility to isolate the string so that do not occur this problem?
>> I would like to avoid to clean the data before because the data entry is free and is always possible insert strange data.
>> Thank you
>>
>>
>>
>> Inviato by mobile phone
>>
>> ------------------------------------
>> Posted by: Valentino Avvisati <valentino.avvisati@gmail.com>
>> ------------------------------------
>>
>>
>> ------------------------------------
>>
>> Yahoo Groups Links
>>
>>
>>
>
> ------------------------------------
> Posted by: crystal 8 <strive4peace2008@yahoo.com>
> ------------------------------------
>
>
> ------------------------------------
>
> Yahoo Groups Links
>
>
>
Posted by: crystal 8 <strive4peace2008@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (10) |
Tidak ada komentar:
Posting Komentar