Loaded version 1410 1036 yesterday
Now have problem with onarrive event on field on a form
The code listed below clears an array, gets the value of group, finds all the sub groups for group, puts them into an array, shows the array for the user to select one, (trace.writeln is a test to confirm the choice made), the user selection is then entered into the current field sub_group
The user selection 'subgroup' written to the trace window is correct but a different value is placed in the field sub_group
This code worked fine prior to loading the update
formopen=obj(":stock 2003")
if is_object(formopen) then
vsubgroup.clear()
group=group.value
subgroup=""
tbl_21=table.open("sub groups 2003")
group=group.value
query.description="subgroups"
query.order="sub_group"
query.filter="group="+quote(group)
query.options="N"
indx=tbl_21.query_create()
numofrecs=indx.records_get()
tbl_21.index_primary_put(indx)
tbl_21.fetch_first()
if numofrecs>0 then
for x=1 to numofrecs
vsubgroup[x]=tbl_21.Sub_group
tbl_21.fetch_next()
next x
tbl_21.close()
subgroup=ui_get_list_array("Subgroups",1,"vsubgroup")
trace.WriteLn("subgroup chosen is "+alltrim(subgroup))'test code line
sub_group.value=subgroup
else
sub_group.value=""
end if
in_use.value=.t.
minimum_stock.activate()
sub_group.refresh()
end if 'if is_object(formopen) then
Now have problem with onarrive event on field on a form
The code listed below clears an array, gets the value of group, finds all the sub groups for group, puts them into an array, shows the array for the user to select one, (trace.writeln is a test to confirm the choice made), the user selection is then entered into the current field sub_group
The user selection 'subgroup' written to the trace window is correct but a different value is placed in the field sub_group
This code worked fine prior to loading the update
formopen=obj(":stock 2003")
if is_object(formopen) then
vsubgroup.clear()
group=group.value
subgroup=""
tbl_21=table.open("sub groups 2003")
group=group.value
query.description="subgroups"
query.order="sub_group"
query.filter="group="+quote(group)
query.options="N"
indx=tbl_21.query_create()
numofrecs=indx.records_get()
tbl_21.index_primary_put(indx)
tbl_21.fetch_first()
if numofrecs>0 then
for x=1 to numofrecs
vsubgroup[x]=tbl_21.Sub_group
tbl_21.fetch_next()
next x
tbl_21.close()
subgroup=ui_get_list_array("Subgroups",1,"vsubgroup")
trace.WriteLn("subgroup chosen is "+alltrim(subgroup))'test code line
sub_group.value=subgroup
else
sub_group.value=""
end if
in_use.value=.t.
minimum_stock.activate()
sub_group.refresh()
end if 'if is_object(formopen) then
Comment