Hi,
I have a form frmMain with subform fsubMain. FrmMain is opened with different open arguments. I am trying to set the record source of fsubMain according to. So what i did is setting this up in the OnLoad event of the parent form frmMain like this and apply a filter but it does not work.
What do i do wrong?
thanks
I have a form frmMain with subform fsubMain. FrmMain is opened with different open arguments. I am trying to set the record source of fsubMain according to. So what i did is setting this up in the OnLoad event of the parent form frmMain like this and apply a filter but it does not work.
Code:
Private Sub Form_Load()
If Me.OpenArgs = "DisplayAll" Then
Me!fsubMainTM.Form.RecordSource = "SELECT ID from tbInvoices;"
me.fsubMainTM.form.filter="ID=" & intX
me.fsubMainTM.form.filterOn=true
End If
thanks