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!

passing data from form to new form 1

Status
Not open for further replies.

kerrigirrl

Programmer
Mar 29, 2001
39
US
this seems like it would be simple, but it's been awhile since i've worked with access and i can't figure it out.

i have two forms, form 1 calls form 2 by the user pressing 1 of 3 command buttons. depending on which button is pushed, i want a field on form 2 to display a letter.

if ADD button is pushed on form 1, form 2 field txt AED should display A. if EDIT is pushed, form 2 field should display E...

thanks in advance!
kerrigirrl
 
Why not use the OpenArgs property?

DoCmd.OpenForm "Form2", , , , , , , "E" is used to call the form.

On Form2's Open event
Private Sub Form2_Open(Cancel as Integer)

txtAED = me.openargs
end sub

Hope that helps!

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top