Findings for those who may need it.
The form in ...x2.mdb is executing the query defined in modules in ...x1.mdb. That is then executing the query defined in queries.
Tests run:
I created two additional queries in ..x1, in the queries section, queryA and queryB.
In ...x1 Modules, I created the following functions
Function FOpenQuery1()
DoCmd.OpenQuery "QueryA"
End Function
Function FOpenQuery2()
DoCmd.OpenQuery "QueryB"
End Function
In ...x2 Form, I modified the code behind the query button as follows:
Private Sub Command7_Click()
FOpenQuery1
End Sub
I also added another button to the form with the following code behind it:
Private Sub Command8_Click()
FOpenQuery2
End Sub
When running the form, I got results for QueryA, and QueryB when the respective buttons were pushed.
Conclusion: From ...x2 form, control is going to ...x1 modules.
MStef, I'm assuming that if ...x2 modules had a function of the same name that would be executed instead of looking for the one in ...x1. Do you know if there is any syntax to explicitely identify which one to execute in this scenario?
Cheers,