If there is a reference from file 1 to file 2 on a given layout (say a field from a table in file 2 is placed on this layout), File 2 will open automatically. If file 1 was opened with a password, fileMaker will attempt to open file 2 with the same account and password.
This would require creating at least on table occurrence in File 1 that refers to a table in File 2.
You can also use Open File in a script to open the second file.
Please note that renaming a file or moving it to a different location relative to the other file can break both methods.
Thank you. I used the Open File command in a script and it works great.