Search This Blog

Form Init Code

Here is a sample of my code in Init of a Form.

SET DELETED ON
SET TALK OFF
PUBLIC pCurrUser
THISFORM.Text9.VALUE = DATE()
THISFORM.BeginBalance()
THISFORM.PettyDisable()
THISFORM.Grid1.Enabled = .F.

DO CASE
CASE ALLTRIM(pCurrUser) = "Admin"
THISFORM.Grid1.Enabled = .T.
THISFORM.cmdApprove.Enabled = .T.
CASE ALLTRIM(pCurrUser) = "User"
THISFORM.Grid1.Enabled = .T.
THISFORM.cmdApprove.Enabled = .T.
ENDCASE

Trial Balance Report


Trial Balance Report of Microsoft Visual FoxPro