addnew Method
Class: tsbaseform
Expand/Collapse source code of procedure addnew Source Code
*-- Add a blank record to the end of the table
IF thisform.WriteBuffer()
  IF thisform.IsNewAndEmpty()
    thisform.Restore()
  ELSE
    IF thisform.DataChanged() AND thisform.AskToSave() = IDCANCEL
      RETURN .F.
    ENDIF
  ENDIF

  *- disable new button
  oApp.oToolBar.cmdNew.Enabled = .F.
  ACTIVATE MENU _msysmenu NOWAIT

  APPEND BLANK
  thisform.RefreshForm()
ENDIF