TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sathya Narayan
NA
155
65.2k
To Search The listview item from combobox
Jul 16 2014 8:23 AM
Hi,
I am using listview and combobox to search the value from combobox,how could i filter the values using combobx .Here is the code i am using.
Values Filled To Combobox
FillCombobox(ComboBox1, "Select slno,custname,address,tinno,cstno from tbl_custinfo", "custname", "custname", "custname")
Listview Filled
Public Sub FillList1()
sSql = "Select slno,custname,address,tinno,cstno from tbl_custinfo"
With lstcust
.Clear()
.View = View.Details
.FullRowSelect = True
.GridLines = True
.Columns.Add("SLNO", 0)
.Columns.Add("Customer Name", 290)
.Columns.Add("Address", 500)
.Columns.Add("Tin No", 103)
.Columns.Add("Customer No", 125)
FillListView(lstcust, GetData(sSql))
End With
End Sub
Used To filter by combobox
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
sSql = "Select slno,custname,address,tinno,cstno from tbl_custinfo where stu='A' and custname Like '" & ComboBox1.Text.Replace("'", "''") & "%'"
If lstcust.Items.Count = 0 Then
Call FillList1()
MsgBox("Selected Records Not Found")
ElseIf lstcust.Items.Count > 0 Then
End If
End Sub
Can any one help?
Reply
Answers (
1
)
Instance of Class and Object
extracting data from xpdf form and posting to access