Sort an Editable Grid View Form, by a field's lookup value

I have an editable grid view form

One of the fields (integer) displays its lookup text value (from another table).

Currently, the form sort’s on that field’s integer value, and I want the form sorted by it’s lookup text value instead. The SQL option for the form does not seem to allow me to specify joins in a FROM?

The picture shows the field in question with both it’s actual value and look up value (just to illustrate the point, normally it would just be the text that’s displayed) - as you can see it is sorted by the actual integer value.

So is it possible to change the form’s overall source query?

Thanks.

Capture.JPG

No, you can’t edit the sql statement. But that is a loooooong requested feature.
Regarding your sorting question, try something like this in the Order By field

(select project_description from projects where projecthours.project_id = projects.project_id)

jsb

Thanks JS - I’ll try that - didn’t think to try a sub-query in the Order By - box… cunning! :slight_smile:

Wow, you saved my life! Really works