Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid Update Problem

Status
Not open for further replies.

RichardH

Programmer
Apr 21, 2001
46
US
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..
 
Assuming Form2 is Modal with a private datasession, and the files are on a network file server, then it may just be a matter of timing. Because it can take awhile for the server to write the new data to disk, when you do the SELECT back in Form1, the new data may not be "available" yet.

Rick
 
Hi,

If your tables are buffered, you may need to do a table update to commit the payment before it will show up. Leland F. Jackson, CPA
Software - Master (TM)
Nothing Runs Like the Fox
 
Form2 is Modal, but I have had the problem reported by users that don't have a network. With local data the table is not buffered.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top