Hello all,
So I have two forms:
- The first one has three comboboxes and one listbox (Area, Subarea, station and operator correspondingly), all of them are filtered in cascade through different queries.
- The selection of the last listbox (operator) opens up a second form with a listbox in it, which shows the same options as the third (stations) combobox in the previous form but filtered differently (through operator instead of subarea).
What I need this to do is that:
- When I select a station in the listbox of the second form and click the button, it takes you back to the first form and auto select the corresponding area in combobox 1, subarea in combobox 2 and combobox 3 should have the same station as selected in the listbox of form 2.
- I created a query that links area, subarea and station to ease a lookup...
- I'm thinking about a code thaton click on button "ok" in form "frm2":
- Go to the first combobox "cboArea" in form "frm1"
- Select in combobox "cboArea" the corresponding value to the lookup in query "QryRelation" column "Area" related to the "Station" selected in listbox "lstStation" in form "frm2"
- Go to the second combobox "cboSub" in form "frm1"
- Select in combobox "cboSub" the corresponding value to the lookup in query "QryRelation" column "Subarea" related to the "Station" selected in listbox "lstStation" in form "frm2"
- Go to the third combobox "cboStation" in form "frm1"
- Select in combobox "cboStation" the "Station" selected in listbox "lstStation" in form "frm2"
how could I have that sequence in code?
thanks for your time!