Nick A.
January 14th, 2000, 10:04 AM
Here's the situation:
I have a form in which i have a data control (or a variable of type recordset, it doesn't matter) which retrieves some records of a table A. From that form, i load another, which contains a grid. That grid is bound to a data control which updates the same table A. If (after i do an update in the grid) i close the form almost immediately, when i return to the previous form and i do a datacontrol.refresh, the data control does not reflect the updates i had done in form 2. Now, if i wait a couple of seconds before i close the second form, after the datacontrol.refresh in form 1 i see all the changes i had made in form 2.
The logic is as follows: just before i close form2 (and i've made sure that no data editing is pending) i do a form1.datacontrol.refresh and then i unload form2.
Question: is there a way, before i close form 2 to "tell" dao to write the updates to disk so when i do a form1.datacontrol.refresh and return to form1 i'll see my changes?
Note that DoEvents doesn't help. I've put many of them, even a 2 seconds delay (a loop executing DoEvents until 2 secs have passed) before i do the form1.datacontrol.refresh but nothing changed.
I have a form in which i have a data control (or a variable of type recordset, it doesn't matter) which retrieves some records of a table A. From that form, i load another, which contains a grid. That grid is bound to a data control which updates the same table A. If (after i do an update in the grid) i close the form almost immediately, when i return to the previous form and i do a datacontrol.refresh, the data control does not reflect the updates i had done in form 2. Now, if i wait a couple of seconds before i close the second form, after the datacontrol.refresh in form 1 i see all the changes i had made in form 2.
The logic is as follows: just before i close form2 (and i've made sure that no data editing is pending) i do a form1.datacontrol.refresh and then i unload form2.
Question: is there a way, before i close form 2 to "tell" dao to write the updates to disk so when i do a form1.datacontrol.refresh and return to form1 i'll see my changes?
Note that DoEvents doesn't help. I've put many of them, even a 2 seconds delay (a loop executing DoEvents until 2 secs have passed) before i do the form1.datacontrol.refresh but nothing changed.