Click to See Complete Forum and Search --> : MSflexgrid


WeeBeng
May 13th, 2001, 09:01 AM
I use the following loop to plot data on a MSFlexgrid.

With Msflexgrid1
for intctr= 0 to 10
.col=1
.row= intctr
.data = rstbl("field1")
next intctr
end with



I am loading the msflexgrid with data from a external database field1. However there are certain rows in the database that have ineligible data.I do not wish to plot this, but I wish to continue using the for loop and the counter. Is there any way to plot the graph, so that certain data can be ommitted if and when I want?
I thank you.

John G Duffy
May 13th, 2001, 02:41 PM
Put a check for valid data in your loop. ONly and if only execute the code. Here is your sample revised to ingore invalid data

With Msflexgrid1
for intctr= 0 to 10
If DataIsValid then
.col=1
.row= intctr
.data = rstbl("field1")
end If
next intctr
end with



Note the "If" and "End If" statements. You will need to replace the DataIsValid word with a test of your own of course.



John G