ERROR EN LISTVIEW URGENTE !!!
Publicado por eduardo Valle (4 intervenciones) el 31/08/2006 22:44:31
tengo un tremendo PROBLEMAAAAAAAAAAAAAA SE ME CAE EN LA LINEA
Set itmX = ListView1.ListItems. _
Add(, , Val(myRs("tipo"))) he probado con CSTR TAMBIEN Y NO RESULTA ME SALE ESTE ERROR
ERROR 13 NO CONCIDEN LOS TIPOS, pero si abro un ejemplo de internet con un form1 solito me CORRE MIL MARAVILLAS, me faltara declarar ALGUNA REFERENCIA O COMPONENTE A PESAR QUE TENGO LOS QUE DEBEN IR como0 el common control etc. solo QUIERO SABER POR QUE ME SALE ESTE ERROR
Private Sub cmdbuscar_Click()
Dim strsql As String
Dim IndiceIcono As Integer
Dim myRs As Recordset
Dim tipo As String
Dim itmX As ListItem
On Error GoTo ERR_ListaCodigos:
strsql = "exec dbo.CAN_CONSULTA_PROBLEMA"
Set myRs = ExeAdoLocal(strsql)
While Not myRs.EOF
Set itmX = ListView1.ListItems. _
Add(, , Val(myRs("tipo")))
' If the AuthorID field is not null, then set
' SubItem 1 to it.
If Not IsNull(myRs("estado")) Then
itmX.SubItems(1) = Val(myRs!Au_id)
End If
' If the birth field is not Null, set
' SubItem 2 to it.
If Not IsNull(myRs("cliente")) Then
itmX.SubItems(2) = Val(myRs("cliente"))
End If
myRs.MoveNext ' Move to next record.
Wend
Exit Sub
ERR_ListaCodigos:
MsgBox "ERROR #" & Err.Number & ": " & Err.Description, vbExclamation, "ERROR"
End Sub
Set itmX = ListView1.ListItems. _
Add(, , Val(myRs("tipo"))) he probado con CSTR TAMBIEN Y NO RESULTA ME SALE ESTE ERROR
ERROR 13 NO CONCIDEN LOS TIPOS, pero si abro un ejemplo de internet con un form1 solito me CORRE MIL MARAVILLAS, me faltara declarar ALGUNA REFERENCIA O COMPONENTE A PESAR QUE TENGO LOS QUE DEBEN IR como0 el common control etc. solo QUIERO SABER POR QUE ME SALE ESTE ERROR
Private Sub cmdbuscar_Click()
Dim strsql As String
Dim IndiceIcono As Integer
Dim myRs As Recordset
Dim tipo As String
Dim itmX As ListItem
On Error GoTo ERR_ListaCodigos:
strsql = "exec dbo.CAN_CONSULTA_PROBLEMA"
Set myRs = ExeAdoLocal(strsql)
While Not myRs.EOF
Set itmX = ListView1.ListItems. _
Add(, , Val(myRs("tipo")))
' If the AuthorID field is not null, then set
' SubItem 1 to it.
If Not IsNull(myRs("estado")) Then
itmX.SubItems(1) = Val(myRs!Au_id)
End If
' If the birth field is not Null, set
' SubItem 2 to it.
If Not IsNull(myRs("cliente")) Then
itmX.SubItems(2) = Val(myRs("cliente"))
End If
myRs.MoveNext ' Move to next record.
Wend
Exit Sub
ERR_ListaCodigos:
MsgBox "ERROR #" & Err.Number & ": " & Err.Description, vbExclamation, "ERROR"
End Sub
Valora esta pregunta


0