Search This Blog

Activity Log in FoxPro

This is my first sample form of Activity Log in FoxPro. My current project which is a General ledger required me to have Activity Log. It is easy to make a log but requires me to update the table from different form and command such as login, logout, add, edit, delete and post. But will be handy of traceability purpose.

Trial Balance in FoxPro

Sample form of Trial Balance in Journal Entries or General Ledger. General Ledger is one of the famous system that is being develop or being automate for faster, easy processing.

Changing Signatory Code

Most of the program I made out of FoxPro required signatory. This signatory can be achieve upon login into the system.

SELECT Signatory
LOCATE FOR signnum = 1
IF FOUND()
REPLACE SignName WITH THISFORM.Text1.Value
REPLACE SignPostion WITH THISFORM.Text2.Value
ENDIF
LOCATE FOR signnum = 2
IF FOUND()
REPLACE SignName WITH THISFORM.Text3.Value
REPLACE SignPostion WITH THISFORM.Text4.Value
ENDIF
LOCATE FOR signnum = 3
IF FOUND()
REPLACE SignName WITH THISFORM.Text5.Value
REPLACE SignPostion WITH THISFORM.Text6.Value
ENDIF
=MESSAGEBOX("Signatories successfully save.")

Changing Image or Picture of a Button

You can definitely change the picture of your bitton upon clicking, try these codes and play with the images. But first you have to prepare the image in JPEG.

IF THIS.Picture = "c:\images\edit.jpg"
THIS.Picture = "c:\images\save.jpg"
THISFORM.cmdClose.Picture = "c:\images\cancel.jpg"
ELSE
IF THISFORM.Combo1.Value = 'PESO'
lAnswer = MESSAGEBOX("Save changes?", 4, "Confirmation")
IF lAnswer = 6
THISFORM.cmdClose.Picture = "c:\images\close.jpg"
THISFORM.cmdEdit.Picture = "c:\images\edit.jpg"
ENDIF
ELSE THISFORM.COMBO1.Value = 'DOLLAR'
lAnswer = MESSAGEBOX("Save changes?", 4, "Confirmation")
IF lAnswer = 6
THISFORM.cmdClose.Picture = "c:\images\close.jpg"
THISFORM.cmdEdit.Picture = "c:\images\edit.jpg"
ENDIF
ENDIF
ENDIF