English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

'Fd1 and sele2 are string variables for feild names
'rs is the record set Access database
'DB1 is a msflexgrid


fd1 = ("TC" + sele2)
While Not rs.EOF
If rs.fd1 = sele3 Then
DB1.Rows = row + 2
scid = rs!SchoolID
DB1.TextMatrix(row, 1) = scid
DB1.TextMatrix(row, 4) = rs!TC01
DB1.TextMatrix(row, 5) = rs!TC26
row = row + 1

error masage object does not support
want help to correct this error

2007-03-11 04:54:37 · 2 answers · asked by suga 1 in Computers & Internet Programming & Design

2 answers

Which object is creating the error? The error message tells you that. Or, what method is in error? The error message tells you that, too.

2007-03-11 05:14:47 · answer #1 · answered by Anonymous · 1 0

First I assume you have properly sized the flex grid using the ROWS and COLS property to size the grid

The text matrix property is expecting a string. Try reading field data into string variables converting datatypes as necessary.

I preferr to index through a recordsets the fields property. Here is an example which also converts to a string variable


Dim myStr as String
myStr = CStr(rs.fields(index).value)

You can create an enumerated list of field names

PUBLIC ENUM myTblFlds
scid = 0
TC = 1
ect...
END ENUM

This will enhance readability:

myStr = CStr(rs.fields(scid).value)

2007-03-11 14:12:54 · answer #2 · answered by MarkG 7 · 0 0

fedest.com, questions and answers