General information
Category:
Forms & Form designer
Title:
Array Driven Combobox Issue
I am currently working on 6.0.
I have a combo box that gets its values from a table. I have a problem when I change a record in the table and I want the changes to show in the combo box. More specifically, the combo box appears blank instead of having any value that's already in the array.
Here's an example of my code along with some things I've tried to make it work. That includes releasing the array and rebuilding it:
thisform.ReportSelCombo.Rowsource=""
release rname_array
public RNAME_ARRAY (1,2)
dimension RNAME_ARRAY (1,2)
SELECT UPPER(filename),upper(contents) FROM reports;
INTO array rname_array;
where not (upper(left(filename,3))="ANR" or upper(left(filename,3))="AMR");
and cver>2 and not deleted();
order by filename
if _tally=0
nRNameLength=1
dimension rname_array(nRNameLength,2)
rname_array(nRNameLength,1)= "** NEW **"
rname_array(nRNameLength,2)= "SELECT THIS TO CREATE A NEW REPORT"
else
nRNameLength=alen(rname_array,1)
dimension rname_array(nRNameLength+1,2)
rname_array(nRNameLength+1,1)= "** NEW **"
rname_array(nRNameLength+1,2)= "SELECT THIS TO CREATE A NEW REPORT"
endif
x=asort(RNAME_ARRAY)
thisform.ReportSelCombo.Rowsource=RNAME_ARRAY
thisform.ReportSelCombo.refresh
thisform.refresh
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only