LOCAL lcAlias
*-- Ensure the proper alias is selected whenver this form is
*-- activated
lcAlias = thisform.DataEnvironment.InitialSelectedAlias
IF !EMPTY(lcAlias)
SELECT (lcAlias)
ENDIF
*-- If this form is using a toolbar, refresh it
IF !EMPTY(thisform.cToolBar) AND ;
TYPE("oApp.oToolbar") == "O"
oApp.oToolbar.Refresh()
ENDIF
*-- Force the menu to refresh
ACTIVATE MENU _MSYSMENU NOWAIT
*-- Update the status bar message
SET MESSAGE TO thisform.Caption
*-- If there are no records in the file, inform user that we
*-- are switching into add mode.
IF EOF()
SKIP -1
IF BOF()
=MESSAGEBOX(ENTERADDMODE_LOC, ;
MB_ICONINFORMATION, ;
TASTRADE_LOC)
thisform.AddNew()
ENDIF
ENDIF