Skip to content

The Confirm Function

The confirm function can be used to pop up a "Yes/No" confirmation. When called, it displays a Windows Yes/No message box. The message box caption will be "Confirm" and it will present the passed question, allowing users to select the Yes or No button. The syntax for using the function is as follows:

Get Confirm QuestionString to bReturnValue

Argument Explanation

  • QuestionString: The question to be presented.
  • ReturnValue: 0 if the response is Yes, 1 if the response is No.

This function can be used at any point in your program and provides a very easy method to ask a "Yes/No" question. For example:

Procedure Run_Report
    Boolean bFail
    Get Confirm "Print Aged Balance Report Now?" to bFail
    If not (bFail) ;
        Send Start_Report of oAgedReport
End_Procedure

The confirm package is defined in the DFConFrm.pkg and is automatically included in DFAllEnt.pkg. You do not need to explicitly "use" it. This means that confirm and message box support are "built right in there" as a resource.

See Also