By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 1,979 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

Linking Fields together in Access

P: n/a
I am creating a form that needs to read information from another table.
The user selects a single value from a drop-down box that is linked to
the first column of data in the table I want to read from. I then have
two other objects that need to take the data from the corresponding
fields of that record.

For example.

If the table looks like this

Column A Column B Column C
2047 4 mlb5000
9999 50 lporter
If a user selects 2047 from the drop down box, the Text boxes following
it will be filled in with 4 and mlb5000. If they select 9999 it will
be filled with 50 and lporter, and so on and so forth. How do I go
about doing this?

Matt

Jul 25 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Matt -
This was answered about a half hour before you made your post.
Learning how to search effectively could save you time.

To answer the question, assuming your combo box is named Combo1 and
the text fields are named Text1 and Text2, they would be filled as
such:

Text1.text = Combo1(1)
Text2.text = Combo1(2)

Combo1(0) is the first field (Column A in your example)

ml*****@psu.edu wrote:
I am creating a form that needs to read information from another table.
The user selects a single value from a drop-down box that is linked to
the first column of data in the table I want to read from. I then have
two other objects that need to take the data from the corresponding
fields of that record.

For example.

If the table looks like this

Column A Column B Column C
2047 4 mlb5000
9999 50 lporter
If a user selects 2047 from the drop down box, the Text boxes following
it will be filled in with 4 and mlb5000. If they select 9999 it will
be filled with 50 and lporter, and so on and so forth. How do I go
about doing this?

Matt
Jul 25 '06 #2

P: n/a
Actually, see the following:

In the AfterUpdate event of the combo enter something like
Me.Text1 = Me.Combo1.Column(1)
Me.Text2 = Me.Combo1.Column(2)

Jul 25 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.