Stuttering Loads

MatthewB

Member
Local time
Today, 10:03
Joined
Mar 30, 2022
Messages
85
I have a continuous form. I put: DoCmd.SetOrderBy "[StrataPlanNr],[ServiceLines]"
to sort the form when it loads.
There is something wrong with this code.

Q1: What?
Q2: Is there a depository of documentation from Microsoft or others about the syntax for such statements?
 
Or you can use the form property sheet to sort the data if you prefer

1655654712837.png
 
I have Google on this laptop. The first link on the page is from MS.

 
I am using a foreign key to set a field that is part of the ordering. As it is a number I am guessing it is sorting numerically (the kp value). What would I need to do to make this sort alphabetically?
Thanks
 
If there is a text field associated with the FK, you would write a SELECT query to JOIN the table you wanted sorted with the table that contains the translation of that foreign key. Then you would sort the query on the text field that you brought in using the JOIN.

Code:
SELECT A.F, A.G, A.H, B.HName FROM A INNER JOIN B on A.H = B.H .... (if you had a WHERE clause, it would go here) ... ORDER BY B.HName;
 
I am using a foreign key to set a field that is part of the ordering. As it is a number I am guessing it is sorting numerically (the kp value). What would I need to do to make this sort alphabetically?
Thanks
If you make it sort alphabetically by making a string, then it would not sort as you think it should? :(
 

Users who are viewing this thread

Back
Top Bottom