Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

await the secondary form close.

Status
Not open for further replies.

Gianricus

Programmer
Apr 2, 2003
62
IT
Hi,
in my app when user find order, i open a Find-Form.
User select the "customer name" from a combo, insert a number order from this form etc.
When user close the Find-form return a param for filter Order table.
I create a one sub in my mainform that open the FindForm, but i want await that the user close this form for receive the param else the sub continue.
it's possible??

Thanks
 
Hi,

I may have got this completely wrong but...

Are you wanting to pass the parameter from the Find-Form to your main form on the Find-Form's unload event????


Harleyquinn
 
hi
do this
lets say the forms are
frmOrder and FrmFind
and the that callls the frmFind be FindOrder()

if u r expecting a return from the FrmFind u should Declare a public variable in frmOrder say

Public FindParam as string

now for the FindOrder() , use modal form

sub FindOrder()
....
frmFind.show VBModal
magbox FindParam 'just example
end sub

now the control will not be back to msgbox Findparam .. line untill the user close frmFind. if u want to know what order no the user selected u have to store the order number in frmOrder.FindParam before the user closes the frmFind
say

in frmFind
.....
Private sub CMdFind_Click()
frmOrder.FindParam=txtOrdernumber
unload me
end sub


~ Hope it helps ~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top