A
astro
I want to build a Filter form that displays a list of values in a listbox
which the user selects from. The values in this listbox are passed to the
filterform. When the user closes this filter form it notifies the calling
form of the filter criteria selected from this listbox. Since any form can
call this filterform the return call address is not known until the filter
form is opened.
Could I setup a callback for this purpose? Is there a better way to do this?
Any advice appreciated. Air code follows............
MainForm:
============
sub openfinder()
dim frm as new FinderForm
dim mydelegate as FinderForm.thisone
mydelegate = addressof SenditHere
frm.show
end sub
sub SenditHere(astr as string)
msgbox ("here it is: " & astr)
end sub
FinderForm:
============
private sFilter as string
public Delegate sub thisOne(byval astr_ as string)
....
....
private sub closeForm (sender, e) handles btnOk.click
call thisOne (sFilter) << DOES NOT COMPILE - "thisOne is a type
and cannot be used as an expression"
end sub
which the user selects from. The values in this listbox are passed to the
filterform. When the user closes this filter form it notifies the calling
form of the filter criteria selected from this listbox. Since any form can
call this filterform the return call address is not known until the filter
form is opened.
Could I setup a callback for this purpose? Is there a better way to do this?
Any advice appreciated. Air code follows............
MainForm:
============
sub openfinder()
dim frm as new FinderForm
dim mydelegate as FinderForm.thisone
mydelegate = addressof SenditHere
frm.show
end sub
sub SenditHere(astr as string)
msgbox ("here it is: " & astr)
end sub
FinderForm:
============
private sFilter as string
public Delegate sub thisOne(byval astr_ as string)
....
....
private sub closeForm (sender, e) handles btnOk.click
call thisOne (sFilter) << DOES NOT COMPILE - "thisOne is a type
and cannot be used as an expression"
end sub