On a subform in my app, I use an ADOQuery, ADODataSource and DBGrid to populate a Read-only DBGrid from an Access table. I then use an ADOCommand to execute an SQL statement to Update, Insert or Delete a record in the table. The data for this comes from an Edit (not dbEdit) box or two.
How do I get the DBGrid to automatically display the modified table? I have tried to Refresh or Update the DBGrid, also Close and Open, and Active=False and True on the ADOQuery, even refreshing the sub-form, all to no avail. I even tried Create and Free on the ADOQuery and DataSource. Putting the DBGrid into Edit and then Post status also has no effect.
Only when I close the subform and re-open it from the main form, does the data displays correctly.
Any help very much appreciated.
How do I get the DBGrid to automatically display the modified table? I have tried to Refresh or Update the DBGrid, also Close and Open, and Active=False and True on the ADOQuery, even refreshing the sub-form, all to no avail. I even tried Create and Free on the ADOQuery and DataSource. Putting the DBGrid into Edit and then Post status also has no effect.
Only when I close the subform and re-open it from the main form, does the data displays correctly.
Any help very much appreciated.