I have some linked tables in my DBC and I use RI triggers on them. In my form I use the local view called for example "MyView" based on those tables. And when I delete a record from the one of MyView's source tables and then call Requery("MyView") function, the Grid representing the records from MyView resets to an empty. As soon as I use Requery("MyView") again just a bit later, the data in Grid appears again.
I've found out that this happens because of Delete trigger I use on source table. It seems to me like Requery() tries to update MyView while RI trigger haven't finished yet.
All I can do is using something like this:
Select SourceTable
Delete
TableUpdate(2, .t., "SourceTable")
MessageBox("Record deleted successfuly") && A little pause for trigger
Requery("MyView")
in order to give my trigger a little time to finish its job.
Does anyone have any idea how to fix this in other way ?
Eugene