Bind a text box from one form to a field on another having a table that is not bound to the form

am trying to bind a text on a form to a field on another form. However, the table I need to bind
it to is not the same as the on in the Form's record source. Is there an easy
way to do this?

I tried to bind it by typing the following in the Text Box controll source
but I got an error:


Is there an easy way to do this?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dale FyeOwner, Developing Solutions LLCCommented:
"Binding" implies that the control contains a value from a field in the forms underlying recordset.

What it sounds like is that you want to display a value that is displayed in another form, on the current form. If that is the case, then you can create an unbound control on form2 and set the ControlSource property of that control, something like:

ControlSource: =Forms!Form1.txt_OtherControlName

If you actually want to fill in the value of a bound control on Form2 with the value from another form, then I would recommend the current event.  Something like:

Private Sub Form_Current

    if me.newrecord then 
        me.txt_ControlName = Forms!Forms1.txt_ControlName
    end if

End Sub

Open in new window

The point of the if statement is that you only, generally, want to update that value if you are on a new record.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.