First, let me say that I am new to the world of coding.
I have a subform nested in a parent form. One field in the subform contains a drop-down list for the user to select an entry. The data in this field is limited to the list.
Here's what I want to do: If the user tries to input something not on the list, the subform's source opens so that the new data may be added. On close of the source, the user is returned to the parent form (to the record they were inputting data) and the new data is included in the drop-down list. The subform is sourced from a query.
Two options I can think of...code triggered from "On Not In List"...
Option 1:
1. Capture the current form (parent form) and record.
2. Close parent form.
3. Open subform's source and add data.
4. Close subform's source.
5. Open parent form and automatically go to the record that data was being entered on.
Option 2:
1. Keep parent form open.
2. Open subform's source and add new data.
3. Close subform's source.
4. Somehow "requery" the drop-down list so new data is included.
Any insight on how to perform either of these options? Which one would be easier, or is there another, simpler way to go about this?
Thanks in advance,
Rod
I have a subform nested in a parent form. One field in the subform contains a drop-down list for the user to select an entry. The data in this field is limited to the list.
Here's what I want to do: If the user tries to input something not on the list, the subform's source opens so that the new data may be added. On close of the source, the user is returned to the parent form (to the record they were inputting data) and the new data is included in the drop-down list. The subform is sourced from a query.
Two options I can think of...code triggered from "On Not In List"...
Option 1:
1. Capture the current form (parent form) and record.
2. Close parent form.
3. Open subform's source and add data.
4. Close subform's source.
5. Open parent form and automatically go to the record that data was being entered on.
Option 2:
1. Keep parent form open.
2. Open subform's source and add new data.
3. Close subform's source.
4. Somehow "requery" the drop-down list so new data is included.
Any insight on how to perform either of these options? Which one would be easier, or is there another, simpler way to go about this?
Thanks in advance,
Rod