Subject Re: SYNTAX ERROR
From maurizio S. <mau@mau.it>
Date Mon, 17 Jul 2017 10:09:15 +0200
Newsgroups dbase.getting-started

try this (avoid with...endwith)


function GRID1_onSelChange()
local cValue
...

cValue =
form.labres1.rowset.fields["item"].lookupRowset.fields["slimit"].value

...
case cValue = "N"
...
case cValue = "M"
...
case cValue = "L"
...


tks
Maurizio

Il 17/07/17 08:44, Mustansir Ghor ha scritto:
> Dear All
>
> 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()
>          form.mytext2.text=form.labres1.rowset.fields["item"].value
>          form.labrsm.visible=false
>          form.labrsn.visible=false
>          form.labresl.visible=false
>          with (form.labres1.rowset.fields["item"].lookupRowset)
>                  do case
>                  case fields["slimit"].value="N"
>                    form.labrsn.visible=true
>                    form.labrsn.setfocus()
>                  case fields["slimit"].value="L"
>                    form.labresl.visible=true
>                   form.labresl.setfocus()
>                  case fields["slimit"].value="M"
>                    form.labrsm.visible=true
>                    form.labrsm.setfocus()
>                  otherwise
>                 
>                 endcase
>         endwith
>     return
>
> Any leads what is the error
>
> Best Regards
> Mustansir
>