There are two approaches you can use for selecting this info:
1) you can select a contact and both the contact and company info is copied into fields of your notice record
2) you can select a company and this narrows your choice of contacts to just those listed for that company giving you a much shorter list from which to select a contact.
Either way, auto-enter field options can copy the data from your related company and contacts tables once you have made a selection. Drop down lists, pop up menus or search portals may be used with either option 1 or 2 as a way to select that contact.
Narrow down what you want to do by selecting from these options and then I can describe that option in more detail if you need me to.
I've taken some time to look at my project and some other interfaces that make sense.
Best solution would be a Search button brings up small window with search field. User enters something in that box and clicks search.
We display a list of results with Company, First Name, Last Name (note from two different tables)
User selects the row they want and hits a button on that window and the resulting data is copied to the relevant fields in the main layout.
Am I asking for the moon here? I can go simpler but if this is not hard to build it would be my first choice.
Thanks for the advice.
You aren't asking the moon. It's not that complicated. And there is more than one solution that matches what you describe.
Search button brings up small window with search field. User enters something in that box and clicks search.
Is a bit vague. What kind of criteria might they be entering into the that "box"? Are they searching for a contact or a company when they enter this info?
You can open a custom dialog with up to 3 input fields or a floating modal window with as many fields (boxes) as you need for specifying the search criteria. I'd have the user input this data into a field with global storage while in Browse mode. Then a script can use that criteria to perform a find and count the number of records found. If more than one record is found, the found set is displayed in a list view where the user can see more detail about each option and click a button--which can be the entire row of data, to select that record. (but would that be a contact record or a company record?).
This thread on scripted finds will provide a basis for the method that I just described: Scripted Find Examples
But this is not the only method that matches what you describe. Your "box" could also be a field placed above a portal that automatically updates with each character entered in to the search field to show fewer and fewer matching records in the portal. Clicking a portal row--which has been formatted to be a button, then selects that contact (or would it be a company?).