|
-
Jun 20th, 1999, 09:03 PM
#1
Thread Starter
Member
Hello,
Can some one help me here. I am trying to put my database that comes from 2 tables inside listview. i am using ado connection. At line "itmX.ListSubItems(1) = CStr
(adoRS!t2_field3)", the compiler is telling me "Invalid property value, run time error 380"
here is my code What am i doing wrong? Any hint is appreciated. Thanks in advance.
private sub loadform
Dim sql As String
Dim itmX As ListItem
Set adoRS = New ADODB.Recordset
sql = "SELECT t1_field1, t2_field3"
sql = sql & " FROM t1, t2" sql = sql & " WHERE t1.field2= t2.field2
adoRS.Open sql, db, adOpenStatic, adLockOptimistic
If adoRS.RecordCount > 0 Then
While Not adoRS.EOF
Set itmX = ListView1.ListItems. _
Add(, , CStr(adoRS!t1_field1))
If Not IsNull(adoRS!t2_field3) Then
itmX.ListSubItems(1) = CStr
(adoRS!t2_field3)
end if
adoRS.MoveNext ' Move to next record.
Wend
End If
end sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|