I created an data access page. I used wizard provided in MS Access. Next, I added a drop down menu. I want to be able to sort data in the access page using the options in the drop down menu.
To do this, I added a OnChange="sortby(this)" event in the select using javascript. And then created a function in the header.
The function trigger when I select the option from the drop down but I just down how to go about sorting the data.
I figured it out after hours of google-ing. MSODSC.DataPages(0).Recordset
Creates a recordset to the table. Then to sort the table,
I used,MSODSC.DataPages(0).Recordset.Sort = "CarID ASC";
This sorted the table in ascending order using CarID field.
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |