Search This Blog

Showing posts with label remote view. Show all posts
Showing posts with label remote view. Show all posts

Remote View Designer in FoxPro

The Remote View Designer allows you to edit the Fields, Join, Filter, Order By, Group By, Update Criteria and Miscellaneous in your view. As a sample I have the AccountChange table from SQL Database to be access.

Release Block User Code

In any login code, aside from status login, logout, I also made use of block. A user has a status of block if his username and password dis not match thrice in a row. This will help in the security of accessing the program.

PUBLIC pBlockUser
IF !EMPTY(THISFORM.Text2.Value)
IF THISFORM.Text4.Value = "BLOCK"
pBlockUser = THISFORM.Text3.Value
lAnswer = MESSAGEBOX("Do you want to release "+ALLTRIM(pBlockUser)+"?", 4, "Confirmation")
IF lAnswer = 6
SELECT SviewAccess
LOCATE FOR IdNum = THISFORM.Text2.Value
IF FOUND()
REPLACE AccessStatus WITH "LOGOUT"
=MESSAGEBOX("Successfully release "+ALLTRIM(pBlockUser)+" .", "Confirmation")
THISFORM.Grid1.REFRESH
ENDIF
ENDIF
ELSE
=MESSAGEBOX("Select a Block User.", "Confirmation")
ENDIF
ELSE
=MESSAGEBOX("Select User.", "Confirmation")
ENDIF

Local View and Remote View

Samples of Local View and Remote View with different filter using like, between and =.

SELECT SviewAccountChart
lAccountCode = ALLTRIM(THISFORM.Text16.Value)+"%"
=REQUERY("SviewAccountChart")

SELECT SviewJvHeader
lJvNo = ALLTRIM(THISFORM.Text20.Value)+"%"
lJvBranch = ALLTRIM(THISFORM.Text21.Value)+"%"
=REQUERY("SviewJvHeader")

SELECT SviewCheckIssueReg
lCheckNum = ALLTRIM(THISFORM.Text20.Value)+"%"
lCheckType = ALLTRIM(THISFORM.Combo3.Value)+"%"
StartDate = THISFORM.Text14.Value
EndDate = THISFORM.Text15.Value
=REQUERY("SviewCheckIssueReg")