I have a crosstab query that has an aggregate field in it that I can not automatically sort when the query runs in Access. I am making a VBA macro and am trying to run the query in there and also sort that particular field. I am not very experienced with VBA so I am getting errors. I am just not sure of the correct syntax. When I try it like below, I get a Data Type Conversion Error. Any help is appreciated. Thank you.
Set rsQuery = dbs.OpenRecordset("Name of my query here", "DoCmd.SetOrderBy Total DESC")
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.