Hi all,
I have a mainform with a listbox.
The listbox is supposed to query the subform from a 'after_update' event:
=============================
Dim sfrm As Form
Set sfrm = Forms![FrmSubForm].Form
With sfrm
.RecordSource = "select * from Qry1 where [SalesPerson]='" & Listbox1 & "' ORDER BY SumIntakt_LS DESC"
End With
=============================
The problem is that I get the error: 'Can't find FrmSubForm..'
What can be wrong?
Kent J.
I have a mainform with a listbox.
The listbox is supposed to query the subform from a 'after_update' event:
=============================
Dim sfrm As Form
Set sfrm = Forms![FrmSubForm].Form
With sfrm
.RecordSource = "select * from Qry1 where [SalesPerson]='" & Listbox1 & "' ORDER BY SumIntakt_LS DESC"
End With
=============================
The problem is that I get the error: 'Can't find FrmSubForm..'
What can be wrong?
Kent J.