I am having an intermittent problem updating a Grid. It involves two forms. On the first form is a Grid that displays the payments received from a single customer. I have the Grid Recordsourcetype property set to 1-Alias. To populate the Grid I use these commands in the Refresh method of form1:
Thisform.folder.page1.grid1.recordsource=""
SELECT date,checkno,amount FROM Receipts INTO;
cursor MyPayments WHERE custno=mycustno
Thisform.folder.page1.grid1.recordsource="MyPayments"
This works fine when the form is first opened.
On the form there is an “Enter payment” command button which opens the second form where a new payment is entered. On that second form, when the user presses the POST command the new payment record is added to the Receipts file and form2 is released.
The problem is that SOMETIMES the Grid on form1 does not display the new record. I am using this code in the Click event of the “Enter payment” command on form1.
Do Form2
THISFORM.REFRESH
Almost all of the time it works fine, but sometimes it doesn’t which is annoying my users. Any suggestions would be most appreciated.
Thanks..
Thisform.folder.page1.grid1.recordsource=""
SELECT date,checkno,amount FROM Receipts INTO;
cursor MyPayments WHERE custno=mycustno
Thisform.folder.page1.grid1.recordsource="MyPayments"
This works fine when the form is first opened.
On the form there is an “Enter payment” command button which opens the second form where a new payment is entered. On that second form, when the user presses the POST command the new payment record is added to the Receipts file and form2 is released.
The problem is that SOMETIMES the Grid on form1 does not display the new record. I am using this code in the Click event of the “Enter payment” command on form1.
Do Form2
THISFORM.REFRESH
Almost all of the time it works fine, but sometimes it doesn’t which is annoying my users. Any suggestions would be most appreciated.
Thanks..