Skip to Content
0
Former Member
Jan 10, 2008 at 02:25 PM

Filling matrix - very slow - urgent

85 Views

Hi,

I have on my form (user form, not system form) matrix with 16 columns. Then I have recordset where I run query which returns about 10 rows from sql - this query takes about 200 miliseccond.

And now is the problem - I need to show the select result from recordset to matrix, but I cannot bind it to each columns, because there I must calculate some values. So I`m filling the values in each cells.

I`m doing it through:

oForm.Freeze(True)

do while not RecSet.EOF

oMatrix.AddRow()

EdtC = oMatrix.Columns.Item("col").Cells.Item(i).Specific

item_code = RecSet.Fields.Item(0).Value()

EdtC.String = item_code

...

RecSet.MoveNext()

loop

oForm.Freeze(False)

The result is ok, but this method is VERY SLOW - filling this matrix takes about 20 seccond.

Is there any way, how to fill the matrix without binding to datasource? Thanks a lot for help!