I am trying to create a report based upon the following query:
SELECT Structures.ADD_NUM, Structures.PREDIR, Structures.ST_NAME, Structures.ST_TYPE, Structures.NOTES, Structures.OADDRESS, Structures.OSPREFIX, Structures.OSNAME, Structures.OSTYPE, Structures.HOUSEHEAD, Structures.COMMUNITY
FROM Structures
WHERE (((Structures.JURISDICTION)="MY CITY"))
ORDER BY Structures.COMMUNITY, Structures.ST_NAME, CLng(Structures.ADD_NUM);
The query works just fine and i am getting the desired results and the sorted order is the desired order.
However, i built a report based upon the query -- and the report is resorting the data different from the query.
The undesireable results seems to deal with the field Structures.ADD_NUM. This field is a text field but it primarily contains numbers. I am using the CLng function in the query to convert the text field to numbers so the sort will work the way i want. However, the report is reordering the data back to the text order (an undesireable order).
Can anyone offer any suggestions on what i am doing wrong and how to correct this problem?
thanks for any and all help
SELECT Structures.ADD_NUM, Structures.PREDIR, Structures.ST_NAME, Structures.ST_TYPE, Structures.NOTES, Structures.OADDRESS, Structures.OSPREFIX, Structures.OSNAME, Structures.OSTYPE, Structures.HOUSEHEAD, Structures.COMMUNITY
FROM Structures
WHERE (((Structures.JURISDICTION)="MY CITY"))
ORDER BY Structures.COMMUNITY, Structures.ST_NAME, CLng(Structures.ADD_NUM);
The query works just fine and i am getting the desired results and the sorted order is the desired order.
However, i built a report based upon the query -- and the report is resorting the data different from the query.
The undesireable results seems to deal with the field Structures.ADD_NUM. This field is a text field but it primarily contains numbers. I am using the CLng function in the query to convert the text field to numbers so the sort will work the way i want. However, the report is reordering the data back to the text order (an undesireable order).
Can anyone offer any suggestions on what i am doing wrong and how to correct this problem?
thanks for any and all help
