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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return a value from a popup form 2

Status
Not open for further replies.

Honestmath

Technical User
Jan 8, 2003
25
US
hi,

is there a way to have my form open up another form (a popup) where a user chooses a value, and when they exit return that value back to the calling form?

thanx a bunch -- math



 
As always, there are a few ways to do this.

In the popup form's On Close event procedure, set the field in the underlying form to the field on the closing form. For example:

Forms![Main Form]![MyField1] = Me![NewField1] Anthony J. DeSalvo
President - ScottTech Software
"Integrating Technology with Business"
 
Yes Sure,

For Easy And Few Value u can use OnkeyDown Event, but for multi values you have to create a table with field Values then make timer in your main form to check the circulation values in that table to open the specified popup or form.

Good Luck
Do It Well, Or Don't.
 
--main form
Private Sub cmdPopup_Click()

DoCmd.OpenForm "Popup", acNormal, , , , acDialog

End Sub
--in the popup form
Private Sub Form_Unload(Cancel As Integer)
Dim frm As Form_Accounts
Set frm = Forms("Accounts")
frm.Text8 = Me.AcctID
Set frm = Nothing
End Sub
 
this is how i do it
in on click of commandbutton on form 1
DoCmd.OpenForm "Popup", acNormal, , , , acDialog
returnvalue1=forms!popup.controlname1
returnvalue2=forms!popup.controlname2
returnvalue3=forms!popup.controlname3
DoCmd.Close acForm, "popup"
in the popup close commandbutton
me.Visible=False
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top