Forum Discussion
How to keep combo box data from change between forms?
- Jan 25, 2022Are these by any chance "cascading combo boxes" where the list of records in one box is filtered by the choice in another? For example, if you pick a state in Box1 then you'll see only a list of cities from that state in Box2. If that's the case, then that would explain why you're not seeing any values. They're not in the list of options that combo box has because it's filtered. You'll need to requery the combo boxes in the OnCurrent event. https://599cd.com/OnCurrent
- anasfsilvaJan 25, 2022Copper Contributor
Thank you for your quick reply. Your youtube videos have been very useful to me in this journey...
I think I have the combo boxes in a relational way, since the data on them depends from other tables as well.- ComputerLearningZoneJan 25, 2022Brass ContributorOK, that combo box looks OK. Make sure you have the other two bound to the correct fields. As far as I can see from your screen shot, everything looks OK.
- anasfsilvaJan 25, 2022Copper Contributor
Ok, the only difference I can tell in the other combo boxes are the fields they pull the info from. But the scripts are similar and they are pulling the correct fields depending on the selection of the previous combo box. So far, good. The other combo box right below that one, which is one that does not show data between forms, also has the option of adding a new "pest_name" from a linked form. That is the only difference, but when I took this out, it did not work anyway, so I kept it.
Now, I have the following events associated with those particular combo boxes, and I think the problem may be here. Do I need to add another kind of script to these combo boxes, so that the "Pest_Type" is not the only thing that changes between each form? After all, the data is well saved into the table whenever I create a new record from the form. It just does not show up in the form view if I go back to previous form records.