hi,

How do i do if there is no record in listview i should disable the payment button. TQ

If ListView1.Text = "" Then
            paymentBtn.Enabled = False
            MsgBox("No Transaction")
        End If

Perhaps if you check the number of items in the listview?

If ListView1.Items.Count = 0 Then
   paymentBtn.Enabled = False
Else
   paymentBtn.Enabled = True
End If
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.