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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

grid problem

Status
Not open for further replies.

budz

Programmer
May 3, 2001
17
Hi everybody, I have a form with a grid and a add command button.
1. At load event of the form, I have
Set multilock on
use table1
=cursorsetprop("buffering",5,"table1")

2. At add command button I have
append blank
do form form2

The form2 is for data entry with text boxes and command button save or cancel
1. At command button save I have
tableupdate(.t.)
thisform.release

2. At command button cancel I have
tablerevert(.t.)
thisform.release

Now, the problem is everytime I add a new record, it always replace the first record with the new data and a blank record was also added.
Thanks for the advice.....s-)
 
Are you using a Private data session for Form2. If yes, change it to use the current data session, or else the data environment will open a separate "copy" of your table (which can't see your newly appended buffered record) and it will use the current record (first based on the index).

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top