My app has two forms. The first is a list box full of names. The second is text boxes with the detail for the list (address, etc.). Following is the steps I take to add or edit names.
1. I open an ado connection to a database and populate a list box with names. I then select a name to edit or hit an Add Name button. This takes me to the second form. (I close the ado connection before going to the second form)
2. As the second form loads, I open another ado connection to the database, populate the text boxes, then enter the rest of the data and hit a Save button which updates the database, closes the ado connection, closes the form, and returns me to the first form.
3. As the first form gets back focus, I reopen an ado connection to the database and repopulate the list box of names.
The Problem - When I return to the first screen, the list box does not show my updates. The only way to see my updates is to put a one second delay before returning to the first form.
So the database update is taking place properly. It just looks like the first form is reloading before the database has a chance to finish updating.
Does anyone know what I'm experiencing? Any help would be greatly appreciated.
Rob
1. I open an ado connection to a database and populate a list box with names. I then select a name to edit or hit an Add Name button. This takes me to the second form. (I close the ado connection before going to the second form)
2. As the second form loads, I open another ado connection to the database, populate the text boxes, then enter the rest of the data and hit a Save button which updates the database, closes the ado connection, closes the form, and returns me to the first form.
3. As the first form gets back focus, I reopen an ado connection to the database and repopulate the list box of names.
The Problem - When I return to the first screen, the list box does not show my updates. The only way to see my updates is to put a one second delay before returning to the first form.
So the database update is taking place properly. It just looks like the first form is reloading before the database has a chance to finish updating.
Does anyone know what I'm experiencing? Any help would be greatly appreciated.
Rob