jvn2k07.files.wordpress.com · Web viewScreen Shots of Project Forms This form is frmLogIn...

4
Screen Shots of Project Forms This form is frmLogIn cmdProceed.Click Thisform.imgFrown.Visible= .T. IF ALLTRIM(Thisform.txtPassword.Value)=WatchWord Then Thisform.Visible= .F. Thisform.imgSmile.Visible= .T. DO FORM MainForm WITH Thisform.txtUserName.Value,Thisform.txtUserType.Value ELSE TryCount = TryCount + 1 Thisform.txtCountPassTry.Visible= .T. Thisform.txtCountPassTry.Value=TryCount Thisform.imgSmile.Visible= .F. Thisform.imgFrown.Visible= .T. IF TryCount = 3 Then MESSAGEBOX("You made 3 incorrect tries already!",16,"Sorry...",7000) QUIT Else Resp= MESSAGEBOX("Invalid Password!",5+32,"Password Error....") IF Resp = 2 THEN QUIT ELSE Thisform.txtPassword.Value="" NODEFAULT ENDIF ENDIF ENDIF

Transcript of jvn2k07.files.wordpress.com · Web viewScreen Shots of Project Forms This form is frmLogIn...

Screen Shots of Project Forms

This form is frmLogIn

cmdProceed.ClickThisform.imgFrown.Visible= .T.IF ALLTRIM(Thisform.txtPassword.Value)=WatchWord Then

Thisform.Visible= .F.Thisform.imgSmile.Visible= .T.DO FORM MainForm WITH Thisform.txtUserName.Value,Thisform.txtUserType.Value

ELSETryCount = TryCount + 1Thisform.txtCountPassTry.Visible= .T.Thisform.txtCountPassTry.Value=TryCountThisform.imgSmile.Visible= .F.Thisform.imgFrown.Visible= .T.IF TryCount = 3 Then

MESSAGEBOX("You made 3 incorrect tries already!",16,"Sorry...",7000)QUIT

ElseResp= MESSAGEBOX("Invalid Password!",5+32,"Password Error....")IF Resp = 2 THEN

QUITELSE

Thisform.txtPassword.Value=""NODEFAULT

ENDIFENDIF

ENDIF

Note: The red-faced clause is your way of passing parameters from the current form (e.g., the LogIn form) to another form (e.g., the MainForm)

This form is named frmMain

To Receive the Passed Parameters from one form (e.g., the LogIn Form)

frmMain.InitLPARAMETERS UserName, UserType

WITH This.txtUserName.Value=PROPER(UserName).txtUserType.Value=UserType

ENDWITH

This is the form for the Queries Menu named frmQueryThe filename can be QueryMenu

This receives the parameters sent by the frmMain when the Queries buttonfrmQuery.Init

LPARAMETERS UserName, UserType

WITH This.txtUserName.Value=PROPER(UserName).txtUserType.Value=UserType

ENDWITH

This passes back the parameters to the frmMain so they’re not lostcmdExit.Click

DO FORM MainForm WITH Thisform.txtUserName.Value, Thisform.txtUserType.ValueThisform.Release

Note: Do these with Reports, Add/Edit/Delete and Search

This is the form the Reports Menu named frmReportsMenuThe filename can be ReportsMenu

This is the form for the Search Menu named frmSearchThe filename can be Searchform or SeachMenu

This is the form for Add/Edit/Delete Menu named frmBrowseThe filename can AddEditDel or Browse