Select Records on a table based on a reference table

I have two tables, an EVENTS table and a RESULTS table. They have a one-to-many relationship, meaning an EVENT may have more than one RESULT, using the EVENT_ID to bind that relationship. Most often I'm required to come up with a report of a particular event to include its results. Right now I have to go through a process to get the job done using both ArcGIS and Excel.

My question is, is there a python script that allows the user to select results from the RESULTS table, based on the EVENT_ID of the events chosen from the EVENTS table. I've attached sample tables for reference.

I think this gives the concept for what you need - this moves through the EVENT table, selects all matching records in RESULTS based on the EVENT_ID that is common between tables and exports them out to a new table named by the event and the event id.

want to have the user interact with this, then there things you'd need to do to set that up but mostly that would involve changing the inputs to the search cursor to accept that input (an event ID for instance) and use that in a where clause.. a lot depends on the sort of interaction you want with the user, and how you need the data output or used in downstream processes.

I think this gives the concept for what you need - this moves through the EVENT table, selects all matching records in RESULTS based on the EVENT_ID that is common between tables and exports them out to a new table named by the event and the event id.

want to have the user interact with this, then there things you'd need to do to set that up but mostly that would involve changing the inputs to the search cursor to accept that input (an event ID for instance) and use that in a where clause.. a lot depends on the sort of interaction you want with the user, and how you need the data output or used in downstream processes.

is it possible to have only one output table for all selected records instead of one table per event

Sure, given that the search cursor honors the selection set you could modify how it outputs things, and probably would be more simple. How are you going to handle the selection from the event table? I know I'm not seeing the full picture of your application here but you could probably manage this pretty easily by making a join between these two tables then making a simple attribute query and outputting the results into a new table. Since there is a 1:M relationship you would have to join the Event table to the Results table (rather than joining results to events.. ), and then its just a matter of how you make a selection from this hybrid table.