In the Click event of the button, use the Dialog_Box() function to pass data to the "collector window". The CreateParam argument is used to pass field-mark delimited data to the collector. Code the following the pass the two strings "data1" and "data2" to the collector window named COLLECTORWINDOW.

CreateParam = "data1" : @fm : "data2"
rtnData = Dialog_Box("COLLECTORWINDOW", @window, CreateParam)

This will start the collector window as a "modal" dialog box. The user must close the COLLECTORWINDOW dialog box before the window can become active again. Many times, this is exactly what you want, because you need the date range data before proceeding.

It is also possible to start the collector as a "nonmodal" window, which means that the user can make the calling window active while the dialog box is still active. Use Start_Window() instead of Dialog_Box(), with the following code:

rtnData = Start_Window( "COLLECTORWINDOW", @window, CreateParam)
  • No labels