I have an Access mdb app built with 2003. There is a search function implemented by filtering. The part in question is a main form that lists Lots (analogous to Orders), and a subform that lists items (analogous to OrderDetails) belonging to the lot shown in main form. There are fields on the form to take user entries and a variant LotWhereCond is constructed from the user entry and when a Search button is hit:
Private Sub SearchLot_Click()
'MsgBox "((" & LotWhereCond & "))"
If LotWhereCond = "" Or IsNull(LotWhereCond) Then
Me!SearchLotFoundLots = Null
Me.FilterOn = False
Me!SearchLotFoundLots = DCount("LotID", "Lots", LotWhereCond)
Me.Filter = LotWhereCond
Me.FilterOn = True
The main form only shows lots that fit LotWhereCond.
It works fine with MS Access 2003.
Now if the mdb (still in 2002-2003 file format) is opened by Access 2010, when search is used, the main form still shows filtered lots properly but the subform is empty (not showing the the items belonging to the lot shown on main form).
The linked field of course is properly set to LotID, as shown in the screen cap.