I have a continuous form tbl_Projects_resources, that operates as a subform. User selects a project to staff, then on the subform, selects a ResourceNo via a combo box. The next field over from resource box is Name of the employee associated with the ResourceNo. The field Name does not exist on the table tbl_Projects_resources, but merely appears on the subform via the command =DLookUp("[Name]","Qry_Resources","[ResourceNo]=Form![ResourceNo]").
When the form tbl_Projects_resources is run by itself, the everything works. Meaning, as the ResourceNo is selected, the appropriate Name appears. There is also a macro, triggered by event when ResourceNo changes. It has only two lines that serve to update field Name. (line 1, SelectObject /Form / tbl_Projects_resources line 2, Requery / Control Name/ Name )
However, when the form is run as a subform, I get the following message.
The object tbl_Projects_resources isn’t open.
The macro you are running (directly or indirectly) contains a GoToRecord, Repaint Object, or SelectedObject action, but the Object Name argument names an object that is closed. The object name argument for the GoToRecord, Repain Object, or SelectObject method names an Object that is closed. Use of the Open Action method to open the object so that you can carry out the desired action.
When the form tbl_Projects_resources is run by itself, the everything works. Meaning, as the ResourceNo is selected, the appropriate Name appears. There is also a macro, triggered by event when ResourceNo changes. It has only two lines that serve to update field Name. (line 1, SelectObject /Form / tbl_Projects_resources line 2, Requery / Control Name/ Name )
However, when the form is run as a subform, I get the following message.
The object tbl_Projects_resources isn’t open.
The macro you are running (directly or indirectly) contains a GoToRecord, Repaint Object, or SelectedObject action, but the Object Name argument names an object that is closed. The object name argument for the GoToRecord, Repain Object, or SelectObject method names an Object that is closed. Use of the Open Action method to open the object so that you can carry out the desired action.