Or can I make a copy of the database with only what I want agents or external people to say linking directly into the main database?
If each user has a unique Account name, then you can use the function Get(AccountName) to identify which layout they should see as their starting layout. Just as you can use File Options to select a specific layout to be visible, you can use the same tool to select a script that performs each time the file is opened. That script can check the Account Name of the current user to deterimine which layout should be selected.
And how can I make that script work automatically when the user logs in?
Choose File | File Options...
Under the Open/Close tab, your see a "When opening this file" section. At the bottom, you see a perform script check box with a Specify... button. Click it and select your script.
You'll note that this is very close to the same spot where you select a layout to be the designated layout to appear when the file is opened. I assumed from your original post that since you knew how to set this up, you also new how to select a script to peform when the file is opened. :smileywink:
But I'm not sure how to word the script? Can you teach me how it should look?
There's a lot of possible variations I can't go into without know more, but here's one example to get the ball rolling:
If [Get(AccountName) = "Admin"]
Go To Layout[ ] //Select a layout for your admin account users
Else If [PatternCount("Tom George HumanResources"; Get(AccountName)) > 0 ]
Go To Layout[ ] // Select a layout for anyone who logs on with one of these three account names
Else If [ /* keep adding Else if steps until you've handled all possible Account Names */]
Get the idea?
Thanks guys for your help.