Ordering a form based on a table?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gblakewood@gmail.com

    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

  • King Ron

    #2
    Re: Ordering a form based on a table?


    gblakewood@gmai l.com wrote:
    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

    Comment

    Working...