I think an example is worth a thousand words. Download this example which I hope is what you want.

Uses this

You can poke around to see how the rest of it is built I think.
After you insert the table control, you need to right click on the fields to change Host ID
and Port ID
from a numeric field to a List box field.
(Note that combo boxes can't be used for this in LO because they only operate on a single field and you need two fields, an ID and something that is the human readable reference to that ID. In Access either combo or list boxes will work.)
I purposely made the Hosts lookup use a query and the ports lookup use SLQ so you could see the two most common ways of getting the pull down list.
Sometimes SQL is better and sometimes Query is better, depending on what you're doing. If your tables are laid out just so, you can use the table directly for your pull down, i.e. field1=displayed text or value, field2=ID key, in that order. But as a rule I like to keep my Key ID as the first field in all of my tables, so never use this method.
Also I've related the tables with Left or Right Join rather than Inner Join. I almost never use inner join because when used to link two tables in a query it hides records from both tables if either is missing, rather than displaying the missing data as empty containers which I prefer.
Other unasked for general design tips I've worked out over the years which I hope you'll consider:
I find naming tables in the plural and records in the singular, and carefully sticking with this, makes the most sense, e.g. the IPs
table (contains multiple IP records), and IP ID
, is the integer representing or pointing to a specific record. Sometimes words like Data are plural without an 's', so you'll use Datum for the record and Data for the table.
I think giving pointers and targets the exact same name is most helpful, especially as your database grows and there is confusion as to what points to what. It's just simpler to keep the two names the same, and more bomb proof. In other words use a field named Host ID
in a primary table and this points to a field named Host ID
in lookup table. (Others call this a foreign key lookup, but I've never found that name very helpful).
And I always try to name the primary key using the table name itself suffixed by ' ID', never some other word or string of text. That way when I look at an ID I know for sure which table it's associated with. So for example, if the table is named Hosts
, then the primary key is always Host ID
(not Hosts ID
because that would be plural, when in fact an ID refers to only one record, not all of the records). For example, IP ID
, or IP_ID
of you like both work fine. I find that IP ID
(with a space) reads and types more easily, because it allows more complex names with multiple words, like Word1 word2 word3 ID
. Space is easier to type than underscore. But this assumes you'll have to quote all of your identifiers, which I always do, but is not always required. I like strict conformity to a few basic rules like this.
Hope this helps you.