B
Bradley C. Hammerstrom
A2K
I need to set the RowSource of my ListBox to match the recordset on another
form, with a filter applied. How?
Currently the code below works to match the recordset, except when a filter
is applied. It still displays all records.
(Curiously, the RecordCount correctly shows the filtered number of records.)
Set db = CurrentDb
Set rs = Forms!frmPhotosPerObs.frmListObsPlaces.Form.Recordset
Me.lstImages.RowSource = "SELECT [qryListObsPlaces].[FilePath],
[qryListObsPlaces].[FileName] FROM qryListObsPlaces));"
Me.txtCount = rs.RecordCount
Brad H.
I need to set the RowSource of my ListBox to match the recordset on another
form, with a filter applied. How?
Currently the code below works to match the recordset, except when a filter
is applied. It still displays all records.
(Curiously, the RecordCount correctly shows the filtered number of records.)
Set db = CurrentDb
Set rs = Forms!frmPhotosPerObs.frmListObsPlaces.Form.Recordset
Me.lstImages.RowSource = "SELECT [qryListObsPlaces].[FilePath],
[qryListObsPlaces].[FileName] FROM qryListObsPlaces));"
Me.txtCount = rs.RecordCount
Brad H.