Loosing my Sort

whitestone

Usually Confused
Local time
Today, 08:13
Joined
Oct 29, 2002
Messages
35
Please help brainy bods this is bugging me…

I have a form, based on a table, with 3 fields, Ref (a reference number preceded by a G i.e. G14), a Definition (text) and a sort key (number field I put in because I couldn’t work out how to sort on the digits in the Ref).

I have set the records to appear in continuous forms and want them to be sorted in numerical order by the sort key (like they are in the table the form is based on).

However, the form always reverts to sorting them by the ref field, which is text so the order comes out as G1, G10, G11, G2..etc. If I select the sort key field in the form and the sort A-Z button it works but doesn’t stay like it.

I have tried to use the Order By field in the properties for the form but even though it says Sortkey in there it doesn’t actually sort by it…..
 
Hello whitestone!
In SUB FORM_OPEN put;

Me.OrderBy = "Sort key"
Me.OrderByOn = True
 
Mos Def, sorry, MStef

Thanks, that works well
 

Users who are viewing this thread

Back
Top Bottom