Search This Blog

Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

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.

Journal Entries on Journal Form

Upon clicking the grid a new form will appear where you can add information. It will also retain information from previous form such as Journal Number, Reference Documents and Particular.

PUBLIC pJournalNo, pJeNum, pRefDocu, pPart
IF !EMPTY(THISFORM.Text5.VALUE)
IF !EMPTY(THISFORM.Text7.VALUE)
THISFORM.Cs_Branches()
pJournalNo = THISFORM.Text5.VALUE
pJeNum = INT(THISFORM.Text7.VALUE)
pRefDocu = THISFORM.Text8.VALUE
pPart = THISFORM.Text1.VALUE
DO FORM "C:\GenLed\Forms\JournalForm"
ELSE
pJournalNo = THISFORM.Text5.VALUE
pRefDocu = THISFORM.Text8.VALUE
pPart = THISFORM.Text1.VALUE
pJeNum = ""
DO FORM "C:\GenLed\Forms\JournalForm"
ENDIF
ELSE
=MESSAGEBOX("Select a Journal Number", "Confirmation")
ENDIF
THISFORM.Grid1.Refresh

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

Edit Save Code


Most of the time neophyte VFP Programmers know how to add, edit and save data on the table. But how can we improve the form design? This is a sample I usually used, to ask or confirm if the User want to edit dat. A confirmation message box will appear with a 'Yes' or 'No'. From that the User can choose which will be the next function.

lAnswer = MESSAGEBOX("Save and update Counter Dispatch?", 4, "Confirmation")
IF lAnswer = 6
SELECT sviewbranch
LOCATE FOR IdNum = THISFORM.Text12.Value
IF FOUND()
REPLACE beginbal WITH THISFORM.TEXT1.Value
REPLACE branchname WITH THISFORM.TEXT2.Value
REPLACE branchaddress WITH THISFORM.TEXT3.Value
REPLACE branchdesc WITH THISFORM.TEXT4.Value
REPLACE debit WITH THISFORM.TEXT5.Value
REPLACE credit WITH THISFORM.TEXT6.Value
REPLACE netchange WITH THISFORM.TEXT7.Value
REPLACE ending WITH THISFORM.TEXT8.Value
REPLACE branchdescnum WITH THISFORM.TEXT9.Value
THISFORM.REFRESH
ENDIF

FoxPro Accounting Form



Sample accounting form using text box, command button, grid and page frame. This is one of my interface I used in Accounting Units. It has complex functions.

Image one has motif of blue and consist of grid, page frame, several text box and several combo box. It has a function of add, edit, save, delete and other function that was require to make the User usage comfortability. It also allows you to search for a certain name and shows or retrieve the dat data on text and combo box.

Image two has more complex function than the first one. It is use for cash and check voucher. Aside from that the viewing of data being save are also incorporate. As you can see there is a five page frame available. These page is utilize to the step by step documentation of data.

While the third image for the purpose of viewing of queued data from the Operation Department thus using the Local Area Connection.