Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!hacgate!ashtate!dbase!awd From: awd@dbase.UUCP (Alastair Dallas) Newsgroups: comp.databases Subject: Re: dbase error level programmining Summary: ERROR() and MESSAGE() are dBASE functions Keywords: Dbase, error programming Message-ID: <161@dbase.UUCP> Date: 14 Jul 89 20:34:36 GMT References: <7915@cs.Buffalo.EDU> Distribution: na Organization: Ashton Tate Devlopment Center Glendale, Calif. Lines: 13 ERROR() and MESSAGE() are dBASE functions. ERROR() returns the number of the dBASE error and MESSAGE() returns a character string describing it. In your code fragment, you specifically check for 5, which is "Record out of range" meaning that the program has attempted to read a record beyond the end of file. Scanning through the database one record at a time will usually produce error #4, End of file encountered, rather than #5, which is produced when some impossible record number is used in, for example, a GOTO statement. Hope it helps. /alastair/