Listbox to show only beds with the same plot_id

When I click the listbox, I want to only see the beds that are available for the selected plot relating to the selected plant :slight_smile:

In the this example the selected plot “YOU” has only two beds. “” and “under cedar” :slight_smile:

When I click the listbox I get all of the beds from every plot :frowning:

This was my attempt:

SELECT DISTINCT "beds"."bed_name", "beds"."bed_id" FROM "plants", "beds" WHERE "plants"."bed_id" = "beds"."bed_id"

upload an .odb sample here, it will be easier to spot the problem with your query, rather than wild-guessing over screenshots

→ This is the guide - more-details

This thread might help