|
-
Feb 6th, 2007, 11:30 PM
#1
Thread Starter
Lively Member
list view problem
in my list view i have a checkbox how can i put the one that the user check in the list view to the database
VB Code:
If LV1.ListItems.Count - 1 > -1 Then
ItemCount = -1
For Each ls In LV1.ListItems
If ls.Checked = True Then
ItemCount = ItemCount + 1
End If
Next
ReDim AccessTitle(ItemCount)
i = 0
For Each ls In LV1.ListItems
If ls.Checked = True Then
AccessTitle(i) = ls.Text
i = i + 1
End If
Next
End If
End Sub
'Private Sub cmbType_Click()
'
' If cmbType.Text = sAdministratortitle Then
'
' For Each ls In LV1.ListItems
' If ls.SubItems(1) = sAdministratortitle Then
' ls.Checked = True
' End If
' Next
'
'
' ElseIf cmbType.Text = sEncoderTitle Then
'
' For Each ls In LV1.ListItems
' If ls.SubItems(1) = sAdministratortitle Then
' ls.Checked = False
' End If
' Next
'
' End If
-
Feb 6th, 2007, 11:48 PM
#2
Re: list view problem
eh what do you mean by database? txt file or something else?
-
Feb 6th, 2007, 11:57 PM
#3
Thread Starter
Lively Member
-
Feb 7th, 2007, 12:05 AM
#4
Re: list view problem
hmm do you have more than one column header?
-
Feb 7th, 2007, 12:07 AM
#5
Thread Starter
Lively Member
-
Feb 7th, 2007, 12:09 AM
#6
Re: list view problem
kk ill figure something out for you one moment
-
Feb 7th, 2007, 12:23 AM
#7
Re: list view problem
hmm do you want it to be removed once you send it to the txt file?
-
Feb 7th, 2007, 12:28 AM
#8
Thread Starter
Lively Member
Re: list view problem
no i just want it to put in the database
-
Feb 7th, 2007, 12:31 AM
#9
Re: list view problem
VB Code:
Private Sub Command2_Click()
On Error Resume Next
Open App.Path & "\lst.txt" For Output As #1
Dim it As ListItem
For Each it In ListView1.ListItems
If it.Checked = True Then
Print #1, it
End If
Next
End Sub
this worked for me it send all the checked items to the lst.txt file
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
|