I am puzzled by the behaviour (or lack thereof) of a subform/query execution.
Setting the stage:
Form frmRailcars has four pages.
On the form header is a combobox that allows for the selection of a railcar id.
Page 1 displays general information about the railcar.
Page 2 displays a list of the parts recovered from this railcar.
It does this as follows:
Page 2 contains a subform object which uses as its Data Source object a form called frmRecoveredParts which uses as its source a query that retrieves part_id,quantity and part_value. The selection criteria is the railcar id shown in the parent form combo box.
When the frmRailcars’ cboCarID_AfterUpdate events executes, it locates the railcar record and populates the various text boxes on Page 1. It also executes the .Requery method which causes the subform on page 2 to be filled with a list of recovered parts.
The subform uses for Master link field and Child link field the fldCarID .
(This is where my mind ran off the tracks , and how I figured out how to make this convoluted system work will remain an enigma for me).
The puzzle:
When I call the frmRailcar form from the forms page of the Access interface, it displays the list of recovered parts just fine.
But when I run the same form from a switchboard form button, it does everything except display the recovered parts list on Page2.
This surprises me because I expected the only function of the switchboard to be the making of a call to the frmRailcar form. Nothing more, nothing less.
I am wondering now if the name of the switchboard form also needs to be embedded in the query criteria somewhere, and if so, how would I make a reference to an hierachy of forms.
Any help would be appreciated!