D
Dib
Hi,
This code is in VB 6 I have converted the code into DOT net 2003.
I need to change this code and some Listbox and combobox.
here is my funvtion code.
If AnyRS.BOF And rs.EOF = True Then Exit Sub
'UPGRADE_WARNING: TypeOf has a new behavior. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1041"'
If TypeOf AnyBox Is System.Windows.Forms.ComboBox Or TypeOf AnyBox Is
System.Windows.Forms.ListBox Then
AnyRS.MoveFirst()
Do Until AnyRS.EOF
If AnyRS.Fields.Count > 1 Then
sRec = AnyRS.Fields(1).Value
nItem = AnyRS.Fields(0).Value
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.AddItem. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
AnyBox.AddItem(sRec)
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.NewIndex. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.ItemData. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
AnyBox.ItemData(AnyBox.NewIndex) = nItem
sRec = ""
nItem = 0
Else
'UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1049"'
If Not IsDbNull(AnyRS.Fields(0).Value) Then
sRec = AnyRS.Fields(0).Value
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.AddItem. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
AnyBox.AddItem(sRec)
sRec = ""
End If
End If
AnyRS.MoveNext()
Loop
End If
Thanks
Dib
This code is in VB 6 I have converted the code into DOT net 2003.
I need to change this code and some Listbox and combobox.
here is my funvtion code.
If AnyRS.BOF And rs.EOF = True Then Exit Sub
'UPGRADE_WARNING: TypeOf has a new behavior. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1041"'
If TypeOf AnyBox Is System.Windows.Forms.ComboBox Or TypeOf AnyBox Is
System.Windows.Forms.ListBox Then
AnyRS.MoveFirst()
Do Until AnyRS.EOF
If AnyRS.Fields.Count > 1 Then
sRec = AnyRS.Fields(1).Value
nItem = AnyRS.Fields(0).Value
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.AddItem. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
AnyBox.AddItem(sRec)
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.NewIndex. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.ItemData. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
AnyBox.ItemData(AnyBox.NewIndex) = nItem
sRec = ""
nItem = 0
Else
'UPGRADE_WARNING: Use of Null/IsNull() detected. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1049"'
If Not IsDbNull(AnyRS.Fields(0).Value) Then
sRec = AnyRS.Fields(0).Value
'UPGRADE_WARNING: Couldn't resolve default property of object
AnyBox.AddItem. Click for more:
'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="vbup1037"'
AnyBox.AddItem(sRec)
sRec = ""
End If
End If
AnyRS.MoveNext()
Loop
End If
Thanks
Dib