I'm having a devil of a time trying to clear a listbox programatically in InfoPath 2007.
I found this example on how to populate a listbox programatically. I was able to incorporate this example into my code and it works correctly. But I have not been able to find or write any code that will reset/clear the listbox so that I can then re-populate it from scratch. Some results I received - I've gotten error messages; I was able to clear out the listbox but was not able to re-populate it; I cleared out the listbox and it re-populated correctly, but 1 of the previous search ID values appears in the listbox.
I've tried this, this(Part 6) and rules to clear fields, all to no avail. Any ideas on how to reset a listbox using the working example above? Or is there another working example out there that both populates and clears a listbox?
Joe