| Frank J. Polan 2005-06-23, 8:23 pm |
| Ross,
I'm not sure if this is what you want, but I zipped up a demo
HTH
Frank Polan
On Thu, 23 Jun 2005 10:57:26 -0700, "Ross Wyborn" <rosswyborn@shaw.ca>
wrote:
>
>Thanks Frank. I was unable to get your program to work because the text line
>was jumbled by outlook and when I tried to correct it I got an error
>(missing quotes). Anyway what I did was set up the same table and make a
>form which had a grid (so I could see what was going on), two entryfields
>(EF1, EF2), a pushbutton and a checkbox (to test result).
>When I used the example(for the pusbutton onclick) as in the example ie;
> if form.rowset.applyLocate("Field1='"+form.EF1.value+"'")
>it worked fine. So thank you for showing me that. I did find the quotes
>confusing and probably would never have got it right on my own.
>However what I wanted to do was:
> form.rowset.beginLocate()
> form.rowset.fields["field1"].value = form.EF1.value
> form.rowset.fields["field2"].value = form.EF2.value
> form.rowset.applyLocate()
> if form.rowset.applyLocate()
> **I also tried if form.rowset.applyLocate() = true
> form.CBTrue.value = true
> else
> form.CBTrue.value = false
> endif
>and this does not work. I also noted that the second scope statement
>(form.rowset.fields["field2"].value = form.EF2.value) was not at all
>considered. I could see from the grid that it was locating fine for the
>first condition but still the checkbox would not show true.I then tried to
>combine two conditions like;
> if form.rowset.applyLocate("Field1='"+form.EF1.value+"'"+and+"Field2
>='"+form.EF2.value+"'")
>but could not get it right - quotes in wrong places?.
>It would be nice if the beginLocate / applyLocate could be used for multiple
>conditions and be able to test if it was true. Surely this is basic
>programming so I wonder why I don't get it.
>Any further light on the subject would be appreciated. Thanks for the one
>example, at least that works.
>Ross Wyborn
>
>
>
|