bring value to other form

  • Thread starter Thread starter arif
  • Start date Start date
A

arif

Guest
hi experts!

my problem here is how i want to bring the value from form1 to form2?

for example:
i want the userId from form1 (userId= U1) appear in form2 when i hit the button that bring the user to the second form.

i tried doing this in my button but it didn't work . my button name here is next.

here is my coding:

Private Sub next_click()

Forms!Form1!userId1.text=Forms!Form2!userId2.text

i got an error message that told me "you can't reference a property or method for a control unless the control has the focus"

where i did wrong here?
thanx for help!!!
 
The way I do this is:

Say I am wanting to transfer the ContactID from form1 to form2

On form1 I just have a button that opens form2

On form2 in the Default Value Field of the ContactID field I put:


=[Forms]![form1].[Form]![ContactID]


Hope this helps

Don
 
thanks both of you!!
donbettis, i'll try your solution first ok.
smile.gif
 

Users who are viewing this thread

Back
Top Bottom