Hello everyone
My objective: I have a property table and a property tax table. For each property several property taxes can be added.
My idea:
I created a link table containing the following columns fk_property_id, fk_property_tax_id, and percentage.
I’m using a subform with a table control. Within the table control I’m using a list control column which allows me to select the property_tax and define a percentage (e.g 3.5% of ownership tax). As several types of taxes can exists a user can just add more by adding a row in the table control.
My question: How can I implement that the listcontrol only will show non previously selected tax types? (It doesn’t make sense to add twice the ownership tax…)
Which is the best way to achieve this? By manipulating the ListSource with a macro when the user clicks the list control it?
The Select-Statement would be
SELECT name, id FROM property_tax INNER JOIN property_property_tax ON property_tax.id = property_property_tax.property_tax_id AND property_property_tax.property_id = :property_id
I’m using Firebird as a DB.
And as always - Thanks for your help
Edit 1: I created the statement and run it through the libreOffice SQL-Window. The result set is correct: