• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
        • Accept Function
        • Advance Statement
        • Ask Statement
        • ChangeKeyboard Function
        • Connection Function
        • DeMode Function
        • Display Orientation
        • EditNote Function
        • EndLevel Statement
        • EndGroup Statement
        • Enter Statement
        • GetCaptureType Function
        • GetCaseLabel Function
        • GetDeviceID Function
        • GetImage Function
        • GetNote Function
        • GetOperatorId Function
        • GetOS Function
        • GetRecord Function
        • GetUserName Function
        • GPS Function
        • Interactive GPS Modes
        • HideOcc Function
        • Highlighted Function
        • InAdvance Function
        • IsPartial Function
        • IsVerified Function
        • Move Statement
        • NoInput Statement
        • OnChangeLanguage Global Function
        • OnChar Global Function
        • OnKey Global Function
        • OnStop Global Function
        • OnSystemMessage Global Function
        • Prompt Function
        • Protect Function
        • PutNote Function
        • RandomizeVS Function
        • Reenter Statement
        • SavePartial Function
        • SelCase Function
        • Set Attributes Statement
        • Set Behavior CanEnter Statement
        • SetCapturePos Function
        • SetCaptureType Function
        • SetCaseLabel Function
        • Set ErrMsg Statement
        • SetFont Function
        • SetOperatorId Function
        • Show Function
        • ShowArray Function
        • ShowOcc Function
        • Skip Statement
        • Userbar Function
        • VisualValue Function
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Set ErrMsg Statement

Format
set errmsg(message_styleʃ,close_messageʅʃ,close_keystrokeʅ);
Description
CSPro data entry applications have two operating modes: operator- and system-controlled modes. Each mode has a different style error message box. System-controlled mode uses a standard Windows dialog box whereas operator-controlled mode uses a customized yellow box. The set errmsg statement allows the user to choose which kind of box to use. The first argument, message_style, is one of the following:
  • default: Reset the box to the default style for the data entry mode.
  • operator: Use the operator-controlled box.
  • system: Use the system-controlled box.
For operator-controlled message boxes, the optional string expression close_message allows you to modify the text that appears beneath the error message, which by default is "Press F8 to clear." Another optional argument, the numeric expression close_keystroke, modifies the keystroke required to close the box.
Calls to this function are ignored when executed on mobile devices.
Examples
set errmsg(system);     // use the system-controlled style
set errmsg(operator);   // use the operator-controlled style
set errmsg(default);    // use the default style for the data entry mode

// defines the error message and defaults to F8 to close the box
set errmsg(operator,"Appuyez sur F8 pour fermer");

// 67 (C) is the key that will close the box
set errmsg(operator,"Appuyez sur C pour fermer",67);

// 67 (C) is the key that will close the box
// but the default error message text is used
set errmsg(operator,67);
See also: SetFont Function