Microsoft Visual FoxPro 6.0 Form

Microsoft Visual FoxPro 6.0 Form (.scx)

*Note: Visual FoxPro Form support only Windows XP operation system.

Step-2

TEXT5                                                                        GOTFOCUS

A=THISFORM.TEXT3.VALUE

B=THISFORM.TEXT4.VALUE

C=A*B

THISFORM.TEXT5.VALUE=C

Step-3

(.dbf File Making)

Field Name                  Type                      Width              Dec

PRODCODE              Character                   8                                 

PRODNAME              Character                   20                   

QTY                            Numeric                      6                      2

RATE                          Numeric                      6                      2

VALUE                       Numeric                      8                      2                     

Step-4

FORM                                                                          LOAD

SET TALK OFF

SET SAFE OFF

USE JIRAT (.dbf File Name)

INDEX ON PRODCODE TO PANDUA (.idx File Name)

FORM                                                                 ACTIVE

GO TOP

THISFORM.TEXT1.VALUE=PRODCODE

THISFORM.TEXT2.VALUE=PRODNAME

THISFORM.TEXT3.VALUE=QTY

THISFORM.TEXT4.VALUE=RATE

THISFORM.TEXT5.VALUE=VALUE

FORM                                                              DEACTIVE

USE

SET TALK ON

SET SAFE ON

TEXT2                                                              GOTFOCUS

C=ALLTRIM(THISFORM.TEXT1.VALUE)

L=LEN(C)

IF L<8

                WAIT WINDOW “IT MUST BE 8 CHARECTER”TIMEOUT 3

                THISFORM.TEXT1.SETFOCUS

ELSE

                SEEK C

                IF FOUND()

                                WAIT WINDOW “IT CAN NOT BE DUPLICATE”TIMEOUT 3

                                THISFORM.TEXT1.SETFOCUS

                ELSE

                                THISFORM.TEXT2.SETFOCUS

                ENDIF

ENDIF

FIRST                                                       CLICK

GO TOP

THISFORM.TEXT1.VALUE=PRODCODE

THISFORM.TEXT2.VALUE=PRODNAME

THISFORM.TEXT3.VALUE=QTY

THISFORM.TEXT4.VALUE=RATE

THISFORM.TEXT5.VALUE=VALUE

NEXT                                                                            CLICK

IF EOF()

                WAIT WINDOW”YOU ARE IN LAST RECORD”TIMEOUT 3

                GO BOTTOM

ELSE

SKIP

ENDIF

THISFORM.TEXT1.VALUE=PRODCODE

THISFORM.TEXT2.VALUE=PRODNAME

THISFORM.TEXT3.VALUE=QTY

THISFORM.TEXT4.VALUE=RATE

THISFORM.TEXT5.VALUE=VALUE

PREVIUS                                                                                         CLICK

IF BOF()

                WAIT WINDOW”YOU ARE IN FIRST RECORD”TIMEOUT 3

                GO TOP

ELSE

                SKIP-1

ENDIF

THISFORM.TEXT1.VALUE=PRODCODE

THISFORM.TEXT2.VALUE=PRODNAME

THISFORM.TEXT3.VALUE=QTY

THISFORM.TEXT4.VALUE=RATE

THISFORM.TEXT5.VALUE=VALUE

LAST                                                                      CLICK

GO BOTTOM

THISFORM.TEXT1.VALUE=PRODCODE

THISFORM.TEXT2.VALUE=PRODNAME

THISFORM.TEXT3.VALUE=QTY

THISFORM.TEXT4.VALUE=RATE

THISFORM.TEXT5.VALUE=VALUE

UPDATE                                                                                          CLICK

REPLACE PRODCODE WITH THISFORM.TEXT1.VALUE

REPLACE PRODNAME WITH THISFORM.TEXT2.VALUE

REPLACE QTY WITH THISFORM.TEXT3.VALUE

REPLACE RATE WITH THISFORM.TEXT4.VALUE

REPLACE VALUE WITH THISFORM.TEXT5.VALUE

WAIT WINDOW “UPDATE RECORD”TIMEOUT 3

CLOSE                                                                 CLICK

THISFORM.RELEASE