Store key value rather than descriptor

I’m new to LibreOffice Base and databases generally so please forgive this elementary question.
I want to create a data entry form that uses at drop down list using data from a table. I want the user to be able to select a descriptive field from the table but rather than storing this descriptive field I want to store the key value associated with that descriptive field . e.g.
if I have a table like
key UID fruit
1 apples
2 oranges
3 pears
the user selects ‘apples’ from the drop down but I want to store the UID for apples (1) in another table Hope this makes sense, thanks in advance.

You need to create a relationship between your tables. Usually this is done by setting a foreign key reference from the table intended to hold the value referenced from another table. See the hsqldb 1.8 manual for how to do this from the Tools < SQL menu in LibreOffice, or else the Base Handbook and its section on setting relations, or using JOINS to achieve what you want. Usually, a subform would be used to contain the listbox control that would then be bound to the appropriate field in your table via the bound field property. This bound field would be linked via the relation to your other table. I suggest you also check out some of the sample databases available here