MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Private Sub MySearches() Dim strSql As String = "" Dim dsData As DataSet cbJob.DataSource = Nothing strSql = " SELECT JobID, Active, Description " strSql = strSql & " FROM tblJob" strSql = strSql & " WHERE Active = 'Y'" strSql = strSql & " ORDER BY Description " dsData = SelectDataSet(strSql) cbJob.DataSource = dsData.Tables(0) cbJob.DisplayMember = "Description" cbJob.ValueMember = "JobID" End Sub
Sub Load_Data() Dim strSQL As String = "" Dim dsData As DataSet Try strSQL = " SELECT DISTINCT ExampleID, SurName, JobID " strSQL = strSQL & " ,'N' RowModified " strSQL = strSQL & " From tblExample " strSQL = strSQL & " Where ExampleID = '1' " If txtName.Text <> "" Then strSQL = strSQL & " And SurName = '" & Trim(UCase(Replace(txtSurName.Text, "'", ""))) & "'" End If If cbDesignation.Text <> "" Then strSQL = strSQL & " And JobID = '" & Trim(UCase(Replace(cbJob.Text, "'", ""))) & "'" End If strSQL = strSQL & " ORDER BY SurName, JobID ASC "
cbJob.DisplayMember = "JobID"
I obviously have some calsses etc going, but the just of the issue should be contained in the code I managed to post.
cbJob.DisplayMember = "Description"
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Automatically add row to table by job in SqlServer 2012||3||14|
|input validations, TryUpdateModel and model binding in asp.net mvc||5||24|
|Need Help With GDI+ in VB.Net||8||41|
|How to send the email using C# with embedded HTML TABLE||3||19|
Join the community of 500,000 technology professionals and ask your questions.