Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Array Driven Combobox Issue
Message
From
22/01/2004 10:41:27
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Array Driven Combobox Issue
Miscellaneous
Thread ID:
00869500
Message ID:
00869500
Views:
48
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
Map
View

Click here to load this message in the networking platform