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

Weard problem with grid

Status
Not open for further replies.

Holm78

Programmer
Mar 5, 2002
60
SE
Hi

I have a grid and a set of data edit buttons (foundation class).

When the form is open and I press the add new button I insert all the data I want (1 is memo) and when I press save the record is reverted. First it shows in the grid as it should end then after I've saved *gone*.

Does anyone know what the problem might be??

Thanks

//Holm
 
Could you post the code that you have in the class for the Save button?

Also, what kind of buffering do you have set? (What is the form's BufferMode property set to?)
 
Is it a one-to-many relationship? Maybe you haven't dealt with the Primary Key relationship between the parent table and the child table?
 
the code for the button is

IF THIS.Parent.EditMode
THIS.Parent.UpdateRows()
ELSE
IF !THIS.Parent.AddRec()
RETURN
ENDIF
ENDIF

THIS.Parent.EditMode = !THIS.Parent.EditMode
THIS.Parent.AddMode = THIS.Parent.EditMode
THIS.Parent.TopFile = .F.
THIS.Parent.ButtonRefresh()
THIS.Parent.NavRefresh()

But that is the original code I haven't write that.
If I make a new form and a new grid and add the buttons, it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top