assign value to form control

  • Thread starter Thread starter mike
  • Start date Start date
M

mike

Hi all,

I have a command button and when I click it, it opens a
form. But can you assign a value from one of the forms
control to another forms control?

For example:

In my user form, I have a user id textbox control. When I
click on the command button(lets call it open), the
command button takes the user id value and opens up a
userinfo forms and assign the userid value to another text
box in the userinfo form.

Is this possible?? How??

Mike
 
Not quite sure what you are trying to do but . . .

Is form 2 to have filtered results based on the userid in form 1?

If yes, have form 2 based on a query where the criteria for userid is:
forms!form1!userid.value

if form 2 is simply a blank form then set the controlsource of the userid2
text box to:
=forms!form1!useridTextBox.value


HTH

Al
 
I have all my forms unbound. So when I click on the
command button, it takes the userid value from the textbox
and assign the userid value into another textbox in
another form. Any clue on how to do it??

mike
 
in the controlsource of form2's userid textbox place the following

= forms!form1!userid.value

This assumes that the textbox on form1 is called userid

HTH
Al
 
Back
Top