orderby sorts on primary Key and not field string

  • Thread starter Thread starter jwsigler
  • Start date Start date
J

jwsigler

I have a problem getting orderby to sort on a column's string text and not
the underlying Primary key. I did the following: 1) Took the standard
Northwinds database and created a form called sortTest using a datasheet form
and the entire Orders Table. 2) after defining an event procedure for a "On
Click" in the Employee column, I tried to execute a Orderby ="EmployeeID".
Even through the column contains strings listing each employee's fullname,
the orderby sorted on the underlying employeeID number instead of the
employee name. The toolbar sort sorts on the employeename, but I can not
figure out how to achieve the same result in a VBA event procedure. Anyone
have any suggests?
 
hi,
2) after defining an event procedure for a "On
Click" in the Employee column, I tried to execute a Orderby ="EmployeeID".
How did you do that?

Me.OrderBy = "EmployeeID"
Me.OrderByOn = True

will sort by ID not by the name. You have to enter the name of the field
of your column in Me.OrderBy.


mfG
--> stefan <--
 
Back
Top