Connecting Tech Pros Worldwide Help | Site Map

Ordering a form based on a table?

  #1  
Old August 10th, 2006, 05:55 PM
gblakewood@gmail.com
Guest
 
Posts: n/a
Simple question (I think)...

I have a form based on a table and I want it to open with it sorted on
Last Name ascending.

I set the order by property for the form to: tblPersonnel.[Last Name]
ASC
but it opens ordered on the PID, which is an autonumber.

Why does it ignore my order by selection?
Thanks,
Blake

  #2  
Old August 10th, 2006, 09:55 PM
King Ron
Guest
 
Posts: n/a

re: Ordering a form based on a table?



gblakewood@gmail.com wrote:
Quote:
Simple question (I think)...
>
I have a form based on a table and I want it to open with it sorted on
Last Name ascending.
>
I set the order by property for the form to: tblPersonnel.[Last Name]
ASC
but it opens ordered on the PID, which is an autonumber.
>
Why does it ignore my order by selection?
Thanks,
Blake
Make sure you set the .OrderByOn property as well

Me.OrderBy = MyColumnName
Me.OrderByOn = True

KingOfChi

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help setting up table structure for ordering by unit. ajhayes answers 15 February 24th, 2009 02:05 PM
Opening a report based on a user defined query wexx answers 32 August 8th, 2007 02:57 PM
re-ordering rows/records Chris answers 4 November 19th, 2005 04:22 AM
Move a Record Up/Down in a Continuous Form ! Prakash answers 6 November 13th, 2005 12:36 PM