Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) |
Listview Problem!!?

Post new topic   Reply to topic Printable version
 View previous topic  My CAPTCHA image decoding quest! Post :: Post Basic winsock trouble getting correct ...  View next topic  
Author Message


PostPosted: Wed May 09, 2012 4:44 am    Post subject: Listview Problem!!? Reply to topic Reply with quote

Can anyone help me...

The error occurs when i have added cat = ListView1.SelectedItem.ListSubItems(icon_cool.gif, it says "Index out of bounds"... i have to display the data from the listview to my 20 textboxes. but when i added the category "cat" the index is out of bounds. and when i added more info and do the same it also give the same error......can anyone help me on this..thanks a lot.... me = ID no.

Name= Name of Employee
departement =Department
divisi = Division
status = Status
ttl = date
gender =sex
cat = type
permanent =permanent

Private Sub ListView1_Click()
End Sub

Private Sub roat()
If ListView1.ListItems.Count = 0 Then Exit Sub

For i = 0 To ListView1.ListItems.Count

me = ListView1.SelectedItem
name = ListView1.SelectedItem.SubItems(1)
department = ListView1.SelectedItem.SubItems(2)
division = ListView1.SelectedItem.SubItems(3)
status = ListView1.SelectedItem.SubItems(4)
date = ListView1.SelectedItem.SubItems(5)
gender = ListView1.SelectedItem.ListSubItems(6)
Location = ListView1.SelectedItem.ListSubItems(7)

cat = ListView1.SelectedItem.ListSubItems(icon_cool.gif
permanent = ListView1.SelectedItem.ListSubItems(9)
resident = ListView1.SelectedItem.ListSubItems(10)


txtID.Text = me
txtName.Text = name
cbodept.Text = department
cbounit.Text = division
cbostat.Text = status
DTPicker1.Value = date
cbosex.Text = gender
txtaddress.Text = Location
cbotype.Text = cat
txtpermanent.Text = permanent
txtresident.Text = resident

Konek_Recordset rscarp, "Select * from kapal where me=" & me
If kapal.RecordCount = 0 Then Exit Sub
Set mstream = New ADODB.Stream
mstream.Type = adTypeBinary
If IsNull(kapal.Fields("photo")) = False Then
mstream.Write rscaripic.Fields("photo").Value
mstream.SaveToFile "" & App.Path & "\image\photo.gif", adSaveCreateOverWrite
Image4.Picture = LoadPicture("" & App.Path & "\image\photo.gif")
Image4.Picture = LoadPicture("" & App.Path & "\image\cewe.gif")
End If
End Sub
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List

Software by php BB © php BB Group
Server Load: 74 page(s) served in previous 5 minutes.

phpBB Created this page in 0.058926 seconds : 26 queries executed (63.5%): GZIP compression disabled