synchronize forms

L

leaf

Hello there,

I want the same id pops up when I click and open a form
within a form. I have a form called PhoneSurvey and
within it I have two forms Age4054 and Age55. If the
person is equal or above age55, he/she will open the form
Age55 to answer a series of questions. I want the same id
to show up when Age55 opens up so that he/she will not
have to type in the id again. The two forms are linked to
two differerent tables called TableAge55 and
TablePhoneScreen.

Will the following code work?

Private Sub openAge55_Click()
[FormAge55]!ID = [FormPhoneScreen]!ID
End Sub

Thanks!

leaf
 
K

Kathryn

If these are text boxes that you want to synchronize, You
need to use ".Value" so access knows that this is what you
want to be equal. Also, this code will only work if both
forms are open (you can't close the PhoneScreen form or
you'll get an error when you try to open Age55)

Private Sub openAge55_Click()
[FormAge55]!ID.Value = [FormPhoneScreen]!ID.Value
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top