home *** CD-ROM | disk | FTP | other *** search
- ********************
-
- FUNCTION Mustfill
-
- PARAMETERS _mustfa, _mustfb, _mustfc, _mustfd, _mustfe
-
- * To tell the end user that the field/variable MUST
- * be filled. The screen position, if not said, will be
- * one column over from the last known screen column
- * position, the row position will default to the same, no
- * tone will sound and the say "This field MUST be filled!"
- * will be echoed.
-
- IF EMPTY(PCOUNT())
- RETURN(.F.)
- ELSEIF PCOUNT() = 1
- _mustfb = ROW()
- _mustfc = COL()+1
- _mustfd = "This field MUST be filled"
- _mustfe = .F.
- ELSEIF PCOUNT() = 2
- _mustfc = COL()+1
- _mustfd = "This field MUST be filled"
- _mustfe = .F.
- ELSEIF PCOUNT() = 3
- _mustfd = "This field MUST be filled"
- _mustfe = .F.
- ELSEIF PCOUNT() = 4
- _mustfe = .F.
- ENDIF
-
- PRIVATE _mustcol
-
- _mustcol = SETCOLOR()
-
- IF LASTKEY() = 5 .OR. !EMPTY(_mustfa)
- IF !EMPTY(_mustfd)
- SETCOLOR(Set_color(Attribute(_mustfb, _mustfc)))
- @ _mustfb, _mustfc SAY SPACE(LEN(_mustfd))
- SETCOLOR(_mustcol)
- ENDIF
- RETURN(.T.)
- ELSE
- IF _mustfe
- TONE(168.00, 4)
- TONE(140,00, 1)
- ENDIF
- IF !EMPTY(_mustfd)
- SETCOLOR(Set_color(Attribute(_mustfb, _mustfc)))
- @ _mustfb, _mustfc SAY _mustfd
- SETCOLOR(_mustcol)
- ENDIF
- RETURN(.F.)
- ENDIF
-
- * End of File