When i run my program it will show this error,this is run time error... My code is
Dim vLst As ListItem
lstExisting.Lis tItems.Clear
With dtaDB
.RecordSource = vSQL
.Refresh
With .Recordset
If .BOF = True Then Exit Sub
.MoveFirst
While Not .EOF
MsgBox "demo"
Set vLst = lstExisting.Lis tItems.Add(, , !ID)
vLst.SubItems(1 ) = !Goods
vLst.SubItems(2 ) = !Qty
vLst.SubItems(3 ) = !Price
vLst.SubItems(4 ) = !Amount
.MoveNext
Wend
End With
End With
Dim vLst As ListItem
lstExisting.Lis tItems.Clear
With dtaDB
.RecordSource = vSQL
.Refresh
With .Recordset
If .BOF = True Then Exit Sub
.MoveFirst
While Not .EOF
MsgBox "demo"
Set vLst = lstExisting.Lis tItems.Add(, , !ID)
vLst.SubItems(1 ) = !Goods
vLst.SubItems(2 ) = !Qty
vLst.SubItems(3 ) = !Price
vLst.SubItems(4 ) = !Amount
.MoveNext
Wend
End With
End With
Comment