help with a popup form

Jon123

Registered User.
Local time
Yesterday, 21:14
Joined
Aug 29, 2003
Messages
668
on form will call it form1 I have 10 fields named Field1, Field2, etc, etc

When I click on any 1 of the fields it opens a popup form called form2. I have a field on form2 called txtname

I want the value of txtname to equal the value of the field that the user clicked on

can this be done?

jon
 
one way would be to use OpenArgs.
Code:
sub txt1_click()
docmd.openform "frm2",,,,,,Me.txt1 'you might need Me.txt1.text
end sub

on form2:
Code:
sub form_load
me.txtname = me.openargs
end sub
 
another way which should work (and better):
on form2:
Code:
sub form_load()
    me.txtname = forms!frm1.activecontrol
end sub
 
that works great thank you

went with the active control

jon
 

Users who are viewing this thread

Back
Top Bottom