0

When I click in listview control to send data in specific textbox then show the error.
run time error 380 Invalid property value.

I write this code:

Private Sub LVEmp_ItemClick(ByVal Item As MSComctlLib.ListItem)
With Item
       Me.txtSrNo = .Text
        Me.txtamount.Text = .SubItems(mlngCUST_LAST_IDX)
       Me.txtdate.Text = .SubItems(mlngCUST_LAST_IDX)

           End With
End Sub
2
Contributors
4
Replies
12
Views
1 Year
Discussion Span
Last Post by Reverend Jim
0

I forget to declare ........

Private Const mlngCUST_LAST_IDX As Long = 1

0

the problem was solved. but now problem is: both text box show same data.

0

now I declare another one like:
Private Const mlngCUST_Date_IDX As Long = 2

0

problem is: both text box show same data

Of course they do. Your code

Me.txtamount.Text = .SubItems(mlngCUST_LAST_IDX)
Me.txtdate.Text   = .SubItems(mlngCUST_LAST_IDX)

is assigning the same value to both textboxes. C hange it to

Me.txtamount.Text = .SubItems(mlngCUST_LAST_IDX)
Me.txtdate.Text   = .SubItems(mlngCUST_DATE_IDX)

Edited by Reverend Jim

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.