Order By on Form

Stew

Registered User.
Local time
Today, 18:57
Joined
Oct 20, 2000
Messages
49
I set the Order By of my form to LastName, FirstName but when someone changes this order to look for something quickly it resets this property the next time the form opens. I've read several posts about this topic already and I attempted to set the OrderBy property of my form OnLoad but I don't seem to be getting the code to work. It seems so simple, it's just two lines and it's driving me nuts. I've tried something like this:

Me.OrderByOn = True
Me.OrderBy = "[LastName]"

Can anyone show me how dumb I'm being? Thanks.
 
Stew,

I've not tested this to see if it works, but have you tried swapping your two lines of code, so that it updates the filter details and THEN applies it?

JT
 
Hey JT,

I received a tip from someone to try the following and it seems to work. The thing is that I could swear I tried it this way but I must have other code with it that was throwing it off. Thanks for your response.


Me.OrderBy = "[LastName], [FirstName]"
 

Users who are viewing this thread

Back
Top Bottom