Subject SYNTAX ERROR
From Mustansir Ghor <mustan31@hotmail.com>
Date Mon, 17 Jul 2017 02:44:29 -0400
Newsgroups dbase.getting-started

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