|
-
Jul 4th, 2000, 11:51 AM
#1
Thread Starter
Hyperactive Member
Any one tell me how to populate a list view box with this
Dim Index As Long
If (loadedcheck) Then Exit Sub
Index = 0
Do
If (Index > 0) Then
Load CheckGDW(Index)
CheckGDW(Index).Top = CheckGDW(Index).Height * Index + CheckGDW(Index).Top
End If
CheckGDW(Index).Visible = True
CheckGDW(Index).Caption = rs!CustomerID
Index = Index + 1
Call rs.MoveNext
Loop Until rs.EOF()
loadedcheck = True
-
Jul 4th, 2000, 01:20 PM
#2
_______
</ tested \> & // Working \\
I'm at work so I don't have time for full documentation but
if you read this you should get the idea..
change the db ctrls and references to yours
tested it...it doesn't load textboxes on your form
it loads a listview with checkboxes....
Private Sub Form_Load()
ListView1.Checkboxes = True
Dim l As Long
Dim dblRnd As Double
Dim dteRnd As Date
With ListView1
' Add three columns to the list - one for each data type.
' Note that the data type is set in the column header's
' tag in each case
'
.ColumnHeaders.Add(, , "String").Tag = "Customer ID"
'
' Set the column alignment - has no bearing on the sorts.
'
.ColumnHeaders(1).Alignment = lvwColumnLeft
End With
'
' Set BorderStyle property.
ListView1.BorderStyle = ccFixedSingle
'
' Set View property to Report.
ListView1.View = lvwReport
'
Dim Index As Long
Dim sql
sql = "select * from Yours"
Data1.RecordSource = sql
Data1.Refresh
' Populate the list with data
While Not Data1.Recordset.EOF
With ListView1.ListItems.Add(, , Index & " " & Data1.Recordset!CustomerID)
Index = Index + 1
End With
Data1.Recordset.movenext
Wend
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Jul 5th, 2000, 03:51 AM
#3
Thread Starter
Hyperactive Member
list view
Will this display a listview with check boxes in scrollable?
-
Jul 5th, 2000, 08:25 AM
#4
_______
<?>
I'v since deleted the project I used to test my code
Copy and paste it and see what you get.
It is better than the checkboxes cause I wrote
that one as well but didn't post it cause I was
waiting for an answer to a question on your question.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
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
|