Subject on open problem
From Charlie <>
Date Sun, 10 Jun 2018 08:01:26 -0400
Newsgroups dbase.getting-started

Hi.. I'm having a problem with when I open this form I have on_open code.  But what happens is it triggers the the grid selchange code which screws everything up.  Is there something I'm doing in the on open code below that is causing this?  Is there something I can do to prevent this from happening?  Should I be using something other than the grid selchange?  Thanks for your help.

The grid selchange is related to the talname table.

function form_onOpen()
           tcost = 0.00
           tsell = 0.00
                //talname = trim(form.talmem1.rowset.fields["talname"].value)
                talname = form.talname1.rowset.fields["lname"].value
                q = form.taldata1.rowset
      cnt = 0
           do while not q.endofset
              z = q.fields["qty"].value * q.fields["cost"].value
              x = q.fields["qty"].value * q.fields["sell"].value
              cnt = cnt + q.fields["qty"].value
         tcost = tcost + z
                   tsell = tsell + x
                form.entryfield1.value := cnt
                form.entryfield3.value := tcost
                form.entryfield4.value := tsell
                set procedure to test.pop additive
                form.popupMenu := new testpopup(form,"testPOPUP")