Hello,
I have a form with three buttons and listbox (vendorBox). When either button is pressed I create a new array from select statement and use following statements to specify the source: THISFORM.vendorBox.RowSourceType = 5 and
THISFORM.vendorBox.RowSource = 'vendorList'. When I run the form it looks like the listbox is populated, but the result is not visible. To resolve it, at the beginning of click event for each button I put clear events statement with matching read events at the end. Now, the code works but I have to click each button twice to get the list displayed. (if clicked once read events statement is skipped and the execution jumps to the click event from another button. Second click puts the pointer to the proper read statement and it works.) It would not be a problem if I did not have to create a select statement when form is released. THere are two issues. First, the form does not get released until the entire code is executed and, second, if I press any button on the form while the code is executed my dynamic select statement keeps growing, cause the execution goes through the destroy event every time form is touched. I've tried almost all suggestions found on this forum, but did not get the problem resolved. I do not have any problems with a listbox being populated from a single array, but it does not work for multiple sources. If anyone knows how to make the listbox work from a single click please help. Any reply is highly appreciated. Thank you!
I have a form with three buttons and listbox (vendorBox). When either button is pressed I create a new array from select statement and use following statements to specify the source: THISFORM.vendorBox.RowSourceType = 5 and
THISFORM.vendorBox.RowSource = 'vendorList'. When I run the form it looks like the listbox is populated, but the result is not visible. To resolve it, at the beginning of click event for each button I put clear events statement with matching read events at the end. Now, the code works but I have to click each button twice to get the list displayed. (if clicked once read events statement is skipped and the execution jumps to the click event from another button. Second click puts the pointer to the proper read statement and it works.) It would not be a problem if I did not have to create a select statement when form is released. THere are two issues. First, the form does not get released until the entire code is executed and, second, if I press any button on the form while the code is executed my dynamic select statement keeps growing, cause the execution goes through the destroy event every time form is touched. I've tried almost all suggestions found on this forum, but did not get the problem resolved. I do not have any problems with a listbox being populated from a single array, but it does not work for multiple sources. If anyone knows how to make the listbox work from a single click please help. Any reply is highly appreciated. Thank you!