Reputation: 3
In Advance: I have two tables, Einnahmen and Personen. Each person in Personen has a name and an abbreviation. These two fields are also present and linked in Einnahmen. Here you can see the relationship of the two tables.
Onto my question: Is it possible to have the corresponding value appear if I enter just one. So for example if I enter the abbreviation, I want the corresponding name to be entered and if I enter the name I want the corresponding abbreviation to appear.
Why? The abbreviations solely exists to make form inputs easier and faster. This is especially used in this . As you can see both the name and abbreviation are visible and if I choose either of them the other one should update accordingly.
If you want to have a look at the tables:
Table Einnahmen:
Table Personen:
Upvotes: 0
Views: 3736
Reputation: 4100
Your database schema should look like this, where the primary key PersonID
could by an AutoNumber field:
In your form, you can use 2 comboboxes, both bound to the foreign key field PersonID
but with different lookup queries:
SELECT Personen.PersonID, Personen.Person FROM Personen ORDER BY Personen.Person;
SELECT Personen.PersonID, Personen.Kürzel FROM Personen ORDER BY Personen.Kürzel;
If one of the 2 comboboxes is used to select a Person, the other one is updated accordingly:
Upvotes: 2