(Ok Chill ^_^)
Do you mean "Trailing whitespace"?
You should always sanitize your data going
into your database. You can use the c# & VB
mystring.Trim()
to clean white-spaces of your data going into the database.
Failing that, the data is now in the database with leading or trailing white-spaces. Clean the data in the select statement:
Try
Dim asql As String = ("SELECT LTRIM(RTRIM(groupname)) FROM tblaccountgroup")
Dim da As New OleDbDataAdapter(asql, cnnOLEDB)
Dim ds As New DataSet
da.Fill(ds)
Cmbogroup.ValueMember = "groupname"
Cmbogroup.DataSource = ds.Tables(0)
Cmbogroup.SelectedIndex = 0
Catch ex As Exception
MsgBox("ERROR : " & ex.Message.ToString)
End Try
Hope that helps ^_^