OrderBy has value

  • Thread starter Thread starter bw
  • Start date Start date
B

bw

When I use the toolbar to sort items on my form, the control that I sort goes into the
OrderBy property field.

I want the OrderBy property field to be empty each time I open this form.

Private Sub Form_Activate()
OrderBy = ""
End Sub

This is apparently not the way to do this...can someone explain?

Thanks,
Bernie
 
Try

Me.OrderBy = ""

Activate will clear the OrderBy as you open the form, but it will also clear
it each time you return to the form if you leave the form open. To only make
sure that it gets cleared as the form opens try the Open or Load event.
 
Thanks for your help, Wayne.

I did what you said, and this seems to be working just as I explained in my original inquiry.
After using Me.OrderBy = "", I then placed the following:
Msgbox "Me.OrderBy" and got a dialog box with nothing in it (as I would expect).

But then when I go into Design mode, there it is...the control name that I had sorted
several Form Opens ago.

It doesn't seem to be hurting anything (and is not sorting by this control), but...Why is it
there?

Thanks for any light you may shed.
Bernie
 
Changes made at runtime aren't permanent. To make the change permanent you
would have to make the change in design mode, whether by code or manually.
 
Back
Top