Subject |
Re: multiple filter problem |
From |
Charlie <tm@tc.com> |
Date |
Fri, 31 Jan 2025 17:46:29 -0500 |
Newsgroups |
dbase.getting-started |
Good shot Heinz. Thanks very much!
Heinz Kesting Wrote:
> 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
|
|