I have a Datasheet as a subform on my MainForm. While the MainForm is open, and a filter is applied, I am attempting to collect details about the filtered datasheet...then (ultimately) step thru the datasheet row-by-row (via .movenext, I presume):
Anyway, here is a quick test via the OnClick event from a second form (pop-up/modal):
If Forms!Mainform![Data subform].Form.FilterOn = True Then
msgbox "Filter is ON"
Forms!Mainform![Data subform].SetFocus
msgbox Forms!Mainform![Data subform].RecordCount
DoCmd.GoToRecord acDataForm, "Forms!Mainform![Data subform]", acFirst
msgbox Forms!Mainform![Data subform].Form.ItemID.value
Else
msgbox "Filter is OFF"
End If
Access can see when FilterOn = True, but is complaining the Form is not open (Err:2489) when I attempt to move to the first record. The MainForm really is Open.
I am assuming my subform references are to blame, but my adjustments have not worked, so far.
Any ideas to assist, please?