||Re: select - like
Mervyn Bick <firstname.lastname@example.org>
||Sat, 1 Oct 2022 09:38:10 +0200
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?
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 + [%']