• Interesting article. I thought I could put it to some good use. I tried to apply this to a report where I need to check that two sets fo date parameters are in "synch" with each other. The code works, and the pop-up appears, but clicking NO (or in this case cancel) I need it to halt the report & go back to the initial parameters screen. I figgure that I need to ad some code between lines 14 and 15 that will halt the report. How do I do that?

    Here is my code:

    1Function CheckParams () as Boolean

    2Dim prompt as String

    3 Dim usrResponse As MsgBoxResult

    4prompt = ""

    5 usrResponse = MsgBoxResult.No

    6 If ((Report.Parameters!FromDate.Value <= Report.Parameters!CDEFromDate.Value) or (Report.Parameters!ToDate.Value <= Report.Parameters!CDEToDate.Value)) Then

    7 prompt = "You entered date ranges that are out of synch. Are you sure you want to continue?"

    8 End If

    9

    10If prompt "" Then

    11usrResponse = MsgBox(prompt,4,"Parameter out of scope" )

    12If usrResponse = MsgBoxResult.Yes Then

    13Return TRUE

    14Else

    15Return FALSE

    16End If

    17Else

    18Return TRUE

    19End If

    20End Function