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
---------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top