Connecting Tech Pros Worldwide Help | Site Map

Ordering a form based on a table?

gblakewood@gmail.com
Guest
 
Posts: n/a
#1: Aug 10 '06
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

King Ron
Guest
 
Posts: n/a
#2: Aug 10 '06

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