Try:
Private Sub Form_Open(Cancel As Integer)
Me.FSinvxSUB1.Form.OrderByOn = False
Me.FSinvxSUB1.Form.OrderBy = Null
End Sub
Look in the help files for how to reference subforms. In your statement, I
assume that FXinvxSub1 is the name of the subform. It's important that this
refer to the name of the subform CONTROL, not the name of the form. By
default, these are the same, but not necessarily.
Barry
Ernie Sersen said:
Thanks Barry... I tried the following code and got a compiler error (Method
or data Member not found). I verified the spelling of both the sub form and
the main form. Am I missing something here?
Private Sub Form_Open(Cancel As Integer)
Me.FSinvxSUB1.FMinvxMAIN.OrderByOn = False
Me.FSinvxSUB1.FMinvxMAIN.OrderBy = Null
End Sub
:
Me.SubFormName.Form.OrderByOn = False
Me.SubFormName.Form.OrderBy = False
:
Try in the OnOpen event of the parent form
me.[subformname].orderbyon = false
me.[subformname].orderby = null
You could do the same thing with the filterby so the user could use it
but as soon as they got out of the mainform, it would be reset.
You may have to play with the addressing to get the the property.