I simple question?

  • Thread starter Thread starter joe
  • Start date Start date
J

joe

I have never done any programing whatsoever and my boss
has given a problem to fix in visual basic. I need to
figure out how I can set up a field to sort multiple
instances of a last name, by those people's first name.
Anyone who could point me in the right direction it would
be apprieciated (the data is saved through Access).
Thanks,
Joe
 
Hi,

Sort by Lastname, FirstName.

Dim strConn As String
Dim strSQL As String
Dim daEmployees As OleDbDataAdapter
Dim conn As OleDbConnection

strConn = "Provider = Microsoft.Jet.OLEDB.4.0;"
strConn &= "Data Source = Northwind.mdb;"

conn = New OleDbConnection(strConn)

daEmployees = New OleDbDataAdapter("Select * From Employees
Order by LastName, FirstName", conn)
daEmployees.Fill(ds, "Employees")


Ken
---------------
 
Back
Top