Subject Re: select - like
From Helen Prior <web2@htsol.co.uk>
Date Sat, 01 Oct 2022 09:55:29 -0400
Newsgroups dbase.getting-started


Dear Mervyn

Thank you ever so much for taking the time to answer me - I really do appreciate it
It now works fine.
--
Regards
Helen

Mervyn Bick Wrote:

> On 2022/10/01 09:08, Helen Prior wrote:
> > Hi Folks
> > Can anyone help me please?
> > I an trying to create a select 'like' statement
> >
> > Form.DAILYLOG2.sql = [select * from DAILYLOG where Keyevent like '%] + Vkeyevent + [%'] or History like ['%] +Vkeyevent + [%']
> > The first 'Keyevent' works fine but when I try and add History it does not.
> >
> > Could someone please put me on the right track?
> > Regards
> > Helen
>
> Building commands into strings can be tricky.  It's a matter of getting
> the delimiters for the various sections in the correct places.  It helps
> to print the string before you try to execute it.  Once it works the
> print statement can be deleted.
>
>
> Form.DAILYLOG2.sql = [select * from DAILYLOG where Keyevent like '%] +
> Vkeyevent + [%' or History like '%] +Vkeyevent + [%']
>
> Mervyn
>