Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 10th, 2006, 05:55 PM
gblakewood@gmail.com
Guest
 
Posts: n/a
Default Ordering a form based on a table?

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
Default 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

 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 network members.
Post your question now . . .
It's fast and it's free

Popular Articles