Connecting Tech Pros Worldwide Help | Site Map

Sorting does not transfer to new form.

 
LinkBack Thread Tools Search this Thread
  #1  
Old May 28th, 2007, 08:15 PM
mark_aok@hotmail.com
Guest
 
Posts: n/a
Default Sorting does not transfer to new form.

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


  #2  
Old May 28th, 2007, 10:45 PM
fredg
Guest
 
Posts: n/a
Default Re: Sorting does not transfer to new form.

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
  #3  
Old May 29th, 2007, 03:15 PM
mark_aok@hotmail.com
Guest
 
Posts: n/a
Default Re: Sorting does not transfer to new form.

On May 28, 6:41 pm, fredg <fgutk...@example.invalidwrote:
Quote:
On 28 May 2007 13:05:50 -0700, mark_...@hotmail.com wrote:
>
>
>
Quote:
Hi everyone,
>
Quote:
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".
>
Quote:
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.
>
Quote:
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???
>
Quote:
-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:
Thanks Fred,

That worked perfectly
-Mark
Quote:
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

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.