Subject Re: multiple filter problem
From Heinz Kesting <Nobody@Nowhere.com>
Date Fri, 31 Jan 2025 23:01:24 +0100
Newsgroups dbase.getting-started

Hi Charlie,
> I am trying to filter on two different fields that are character, but get an error 'expecting logical'.  I've tried macros and other things
>
> How can I get this to work?
>
> function COMBOBOX1_onChange()
>        ct = form.category1.rowset
>        cl = form.collection1.rowset
>                 fltr = trim(ct.fields["cat"].value)
>                 fltr2 = trim(form.combobox1.value)
>                 if trim(form.combobox1.value) = "ALL ERAS"
>                     // trim(form.combobox1.value)
>                 else
>                    msgbox( ""+fltr+" "+fltr2)  //filters show correct data in this msgbox.
>                    //fltr2 = ""
>                  cl.filter = [era ='] + fltr2 + ['] and [category ='] + fltr + [']//  line that gets the

Reading the line which gives the error, I would say, you are not
concatenating the two filter statements correctly

Just a shot in dark:

cl.filter = [era ='] + fltr2 + [' and category ='] + fltr + [']

Perhaps I'm totally wrong here, but please give it a try

Hope this helps ... Heinz