swagar
09-20-2000, 04:47 AM
On some button events I set filter and orderby properties on. When I close the form I want to set the properties off. Even though I have written the statements properly, the orderby immediately executes the next time the form is opened. Can anyone give me another way of doing this? or explain why this is happening?
Robin
09-27-2000, 06:20 AM
Hi,
Because the properties are set in design, changing them in code only effects this instance of the form. To get the property to stay off till you want it you must set the proprty in code in the same way as you change it in code.
Hope that makes sense
Robin.
swagar
10-05-2000, 11:59 AM
Robin, thanks for responding to my problem. I am however already trying to turn the orderby off in code. Any other suggestions ?Here is an excerpt:
Private Sub Form_Load()
Me.OrderBy = ""
Me.OrderByOn = False
End Sub
Rich@ITTC
10-05-2000, 02:47 PM
Hi Swagger
I may be missing something, but your coding seems to contradict internally what you want to achieve.
I think you may need one or the other line but not both in the way you have done it.
Me.OrderBy = ""
Me.OrderByOn = False
The first line sets the "OrderBy" property to a null value (so it won't sort on anyhting) but then you set the "OrderByOn" property to "False" (so doesn't this negate the earlier command?)
Try
Me.OrderBy = ""
Me.OrderByOn = True
I hope that helps
Rich
swagar
10-06-2000, 04:31 AM
Thanks for the input. I have tried setting orderby to null and orderbyon to true. This still did not work. It seems once I set the orderby, orderbyon properties in code, the form properties are updated, then in the next form load they do not get set back by any statements Form load subroutine. The design properties for the form will still contain the old order by string.