I have one form with a couple of subforms on it. Until now I have been using the link master / link child relationship to present only the appropriate records on the subforms.
I have just started to implement a scheme where new records for the table that feeds the subform can be entered by clicking on a command button to open a modified version of the subform (a little larger, for one thing, with a couple of extra data fields). The VBA routine needs to determine how many records are displayed on the (other) subform in order to know whether a particular control is active and can supply information to the data entry form. I also wanted to have an indicator of how many records are included in the subform since only a couple are visible at any time.
I was unable to do either of those things (any pointers will be appreciated ), but when I wrote a query to extract all of the data fields from the tables that feeds the subforms and set the criteria in the query to the control on the main form I was able to count count the number of records returned by the query.
Since the query returns only the records that would be displayed with the Link Master and Link Child fields set in any event, I was able to use the query results and delete the Link fields in the subform details. So far everything still works , but I wonder which of the two approaches (criteria in query versus link Master / Child) is preferred? Is there a difference in speed or likelihood of failure down the road?