On 1/20/2018 1:53 PM, Mustansir Ghor wrote: > Dear All > > I have put following statement on form_open() method (xyz.dbf has fields code, name) > > mq1 = new query() > mq1.sql = select * from c:xyz" > mq1.active = true > > when I refer to this query later in the form with following statement it says variable mq1 undefined > > form.mq2,rowset,fields["item"].lookuprowset = mq1.rowset > > Can anybody guide where is the error. >
You need to make it a property of the form:
form.mq1 = ...
It is not automatically such, as a matter of fact it is only available
in the form's open() method the way you have the code written.