Using 2 listviews and calendar

KnightS
03-18-2003, 12:33 AM
Hi all,
I would like to do a search of my master listview using the start date column and match items' start date to the calendar value which the user will click, after which those items of the same start date will be copied over to another listview. how do i do that?

here's my structure of my master listview:

ListView1.View = lvwReport
ListView1.Sorted = True

With ListView1.ColumnHeaders
.Add Text:="Subject"
.Add Text:="Start date"
.Add Text:="Due date"
.Add Text:="Priority"
.Add Text:="Category"
.Add Text:="Status"
.Add Text:="Due time"
.Add Text:="Notes"
.Add '-- Dummy column. No text in case user pulls out to view.

.item(1).Width = 2100
.item(2).Width = 1000
.item(3).Width = 1000
.item(4).Width = 1300
.item(5).Width = 1600
.item(6).Width = 0
.item(7).Width = 0
.item(8).Width = 0
.item(9).Width = 0 '-- Dummy column.
End With

'-- Put some data in the listview.
With ListView1.ListItems


Set oListItem = .Add(, , "Software engineering project ")
oListItem.Tag = Format("", "")


oListItem.ListSubItems.Add , , CDate("04/05/03")
oListItem.ListSubItems(1).Tag = Format$("", "mmddyy")


oListItem.ListSubItems.Add , , CDate("05/18/03")
oListItem.ListSubItems(2).Tag = Format$("", "mmddyy")


oListItem.ListSubItems.Add , , "High"
oListItem.ListSubItems(3).Tag = Format$("", "")

oListItem.ListSubItems.Add , , "Academic"
oListItem.ListSubItems(4).Tag = Format$("", "")

oListItem.ListSubItems.Add , , "Pending"
oListItem.ListSubItems(5).Tag = Format$("", "")

oListItem.ListSubItems.Add , , CDate("15:30")
oListItem.ListSubItems(6).Tag = Format$("", "HHMM")


'-- No tag property - will get sorted incorrectly.

oListItem.ListSubItems.Add , , "Design document handed in "

'-- Dummy ListSubItems column.
oListItem.ListSubItems.Add

Machaira
03-18-2003, 12:56 PM
We don't write code for people (usually :) ), we help with problems with existing code. You have to at least attempt to write the code yourself. What exactly are you having trouble with?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum