If both files have the same account name and password defined in manage security, a button that uses Open File to open the second file (Use Open Remote option when setting up the Open File Step to open the other file.) will open the second file without asking the user to enter an account name and password.
This works because file make will use the credentials used to open the first file to open the second file and only resorts to a log in dialog if no matching account is located in the second file.
But I don't want to open the other file, just access the data within it.
And how would you access the data in a file without opening it? It may only be opened as a hidden background file but you have to have it open.
If you have matching account credentials, you only need go to Manage | External Data Sources or Manage | Database | Relationships to set up an external data source reference to the other file.
From Manage | Database | Relationships, you can click the button for adding a new Table Occurrence (bottom far left) and then select the "add FileMaker Data Source" option to open a dialog where you find the other file and select the needed table from that file. You now have a table occurrence that you can link to any of the other table occurrences just as though the table were local to your current file. And, as long as the log in credentials can match, anytime a part of your file references data in that table occurrence, FileMaker will quietly open that file in the background and the data in that table becomes accessible.
It's still not opening as I'd expect. There might be something more to it though - my admin console is inaccessible from all but the server machine; I think there's a problem with the web server, I've contacted FM support and they're currently looking in to my log files.
I have set up the same user and password in both database files. And in the secondary "stock" database, the first layout it opens is a list view of a table occurrence from the primary "products" table.
When FM get back to me, I'll see if it works as I expect then.
I still haven't got the web server up and running, but that's for a different topic.
I have however managed to get the database to open without the popup message though; it seems I had the external data source filepath set to the direct location of the file and not the remote address.
It used to say:
Now it says: