Search This Blog

Showing posts with label branch name. Show all posts
Showing posts with label branch name. Show all posts

Branch Setting

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

Login Form


Fill-out the Username, Password and Branch field and click the OK button to continue. The following spaces should be filled with correct Username, Password and desired Branch to continue. Selected branch will give you information and data for that branch only.

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()