Converting from VB6 and CR9 to VS2008 and CR2008. Have a module that is identical in both however the VB6 part prints exactly as it should where the VS2008 part prints all available records.
A listview with checkboxes is populated with the records to be printed. The user chooses which records and this sub is used to print the records:
xItem and dataMgr are procedure wide. The collection, cCol, holds the number of records checked. What needs to be changed for this to work in vs2008/cr2008?
Thanks.
A listview with checkboxes is populated with the records to be printed. The user chooses which records and this sub is used to print the records:
Code:
Private Sub ToolStripPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripPrint.Click, PrintToolStripMenuItem.Click
bComplete = True
cCol = New Collection
For Each Me.xItem In lvwPrintNameTag.Items 'loop through each item in the listview
If xItem.Checked Then 'check for selected item'
cCol.Add(xItem.Text) 'add to the collection
End If
Next
If cCol.Count = 0 Then
MsgBox("Nothing checked", vbInformation)
Exit Sub
Else
For i = 1 To cCol.Count
iID = cCol.Item(i)
dataMgr.FindOneName(iID, mMem) 'Gets all info to update record
mMem.PrintNameTag = True 'reason to update record so that record
dataMgr.UpdateMembers(iID, mMem) ' is not printed second time
Next
With frmPrintTagAdhesiveSelected
.Text = "Name Tags - Adhesive"
.Width = 890
.Height = 1000
.Top = 10
.Show()
End With
End If
End Sub
xItem and dataMgr are procedure wide. The collection, cCol, holds the number of records checked. What needs to be changed for this to work in vs2008/cr2008?
Thanks.