Search This Blog

Public

Recently I learned how to use PUBLIC in getting info or data from another form to another form. And it was very usable for me since my program has a login and branch name requirements.

On Login Form
PUBLIC pBranchName
pBranchName = ALLTRIM(THISFORM.Combo1.Value)

On Branch Setting Form
PUBLIC pBranchName
THISFORM.Label18.Caption = pBranchName

On Journal Entry Form
PUBLIC pBranchName
LOCATE FOR ALLTRIM(BranchName) = ALLTRIM(THISFORM.Combo1.Value)
pBranchName = ALLTRIM(BranchName)
= MESSAGEBOX("You select "+ALLTRIM(pBranchName)+" Office?", "Confirmation")
THISFORM.Release()