On 28 May 2007 13:05:50 -0700,
mark_aok@hotmail.com wrote:
Quote:
Hi everyone,
>
I have a form which contains a datasheet. And I allow the user to
sort it by right clicking on the field, and clicking "Sort Ascending",
or "Sort Descending".
>
But I also have a button called "Display Results", which brings up a
new window in form view which has a bunch of text boxes for each of
the fields, displaying each item. I have been able to set the record
source correctly. But the sorting is completely wrong.
>
I have tried determining the orignial forms .Sort, .OrderBy. But
neither property are set. Where can I find the string containing the
CORRECT sorting of the datasheet???
>
-Mark
To open the second form sorted according to whatever field was
selected on the first form, code the Form1 "Display Results" command
button click event:
DoCmd.OpenForm "Form2", , , , , , Me.OrderBy
Code the Load event of Form2:
If Not IsNull(Me.OpenArgs) Then
Me.OrderBy = Me.OpenArgs
Me.OrderByOn = True
End If
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail