Subject Re: SYNTAX ERROR
From Mustansir Ghor <mustan31@hotmail.com>
Date Fri, 21 Jul 2017 14:27:40 -0400
Newsgroups dbase.getting-started

Dear Bruce

Thanks. This is very useful information.

Regards
Mustansir

Bruce Beacham Wrote:

> On 17/07/2017 07:44, Mustansir Ghor wrote:
> > In the below function following statement in the do case statement that gives error "
> > form.labrsn.visible=true" as Data type mismatch expecting an object.
> >
> > function GRID1_onSelChange()
> >          with (form.labres1.rowset.fields["item"].lookupRowset)
> >                   do case
> >                  case fields["slimit"].value="N"
> >                    form.labrsn.visible=true
> >                    form.labrsn.setfocus()
>
> > Any leads what is the error
>
> I think you'll find that within a WITH...ENDWITH block of a query (an
> independent object in a way that, say, a text control is not) the scope
> of variables changes, and form. is not known.
>
> Save and run this code and note how far the code gets:
>
>
> Bruce Beacham
>
> ********************************
> d = new database("dbasesamples")
> f = new form()
> f.tx = new text(f)
> f.q = new query(f)
> f.q.sql = [select * from :dbasesamples:fish]
> f.q.active = true
> with (f.tx)
>     form.classID = 3
>     ? "Done text control"
> endwith
>
> with (f.q.rowset.fields["name"])
>      form.classID = 3
>      ? "Done field"
> endwith
>
> return
>
> ********************************



Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0