Hello,
I have an unbound multi-selection List box on a main form (data entry) which is populated by a query and only becomes visible once the user selects the "Case_ID" from a combo box. I then allow the user to select multiple items in the list to associate with this new record. These associations however are recorded in a seperate link table, hence this list box being unbound.
I can fill out all the fields on the main form including selecting multiple items in the list box, but as soon as I enter the subform the record saves and the selections in the list box disappear. Unfortunately I want to run further code (a dynamically built sql insert statement) on the list box selections once the user hits the 'save' button on the main form (after filling out the subform).
The key for the new record on the main form is an auto-number and so is not assigned until at least one field is populated. As this key is also a foreign key in my link table I cannot save the list box selections until after the main form record is saved.
So basically I am asking how I can maintain the list box selections after the user focuses on a field in the subform? If this is not easily acheived (without a huge block of code) then is there another event on the main form or subform I can use to trigger the list box operations after the main record is saved but before the selections disappear?
I apologise if this is at all unclear, please feel free to ask me further questions.
Thanks,
Kiashi
I have an unbound multi-selection List box on a main form (data entry) which is populated by a query and only becomes visible once the user selects the "Case_ID" from a combo box. I then allow the user to select multiple items in the list to associate with this new record. These associations however are recorded in a seperate link table, hence this list box being unbound.
I can fill out all the fields on the main form including selecting multiple items in the list box, but as soon as I enter the subform the record saves and the selections in the list box disappear. Unfortunately I want to run further code (a dynamically built sql insert statement) on the list box selections once the user hits the 'save' button on the main form (after filling out the subform).
The key for the new record on the main form is an auto-number and so is not assigned until at least one field is populated. As this key is also a foreign key in my link table I cannot save the list box selections until after the main form record is saved.
So basically I am asking how I can maintain the list box selections after the user focuses on a field in the subform? If this is not easily acheived (without a huge block of code) then is there another event on the main form or subform I can use to trigger the list box operations after the main record is saved but before the selections disappear?
I apologise if this is at all unclear, please feel free to ask me further questions.
Thanks,
Kiashi