Hi.
Access front end / sql server backend. I have vba sql to pull data from 3 joined tables. T1 left join to T2 Left joined to T3. I do not know if the T3 has any entries so I cannot add an "Order by T3.Element desc". I have to wait until I get the results to find out if there are any T3 elements. If I add the order by to the sql and there are no elements, I get a error as expected. So, I thought I would run and then use the ado_rs.sort I searched the web and found you .... ado_rs.Sort "ElementNameToBeSorted desc, ElementNameOfOtherToBeSorted asc". But, I get a compiler error: Invalid use of property. I got syntax from
HTML Code:
https://docs.microsoft.com/en-us/sql/ado/reference/ado-api/sort-property-example-vb?view=sql-server-ver15
I assume there is not a special reference I need... all other ado stuff works as expected.
Can anyone help?
Steve
Harrisburg, PA