Using combo box to source two controls

Aikistan

Registered User.
Local time
Today, 15:56
Joined
Oct 25, 2017
Messages
10
Hello again everyone!

I have a form (frmSponsorEntry) for simple name/address entries into a table (tblSponsors). For SponsorName, I have a combo box (cmbSponsorName) that queries a table (lutblTEAMID) to use as its list. lutblTEAMID has fields TEAMID, State, and Grantee.

cmbSponsorName
Control Source - SponsorName
Row Source -
SELECT lutblTEAMID.State, lutblTEAMID.Grantee, lutblTEAMID.TEAMID FROM lutblTEAMID ORDER BY lutblTEAMID.State, lutblTEAMID.[Grantee];
Row Source Type - Table/Query
Bound Column - 2

What I'd like to do is pass the value for State from cmbSponsorName to display the State value in a text box on the same form txtSponsorState. That is, when entering, I'd select the Sponsor Name and the txtSponsorState control populates with the State value associated with the SponsorName selected in cmbSponsorName.

Is this possible? If so, how?

edit: txtSponsorState is only to display the state on the form, not to enter its value into a table.
 
Last edited:
Well, that was easy. <facepalm>
 
Often the things that seem hard turn out to be easy, and vice-versa. :p
 
Actually, I made that change to txtSponsorState and now cmbSponsorName is displaying the State value rather than Grantee. Bound column is still set to 2.

edit: It's displaying the State but entering Grantee into the field. I need it to show Grantee.
 
Last edited:
What is the column widths property?
 
The Column Widths are 0.25";6.45";0.45" I played around with them to no effect. I've attached a Form View of what I'm doing/seeing.
 

Attachments

  • Selecting with cmbProjectSponsorName.jpg
    Selecting with cmbProjectSponsorName.jpg
    59.8 KB · Views: 147
  • What I get.JPG
    What I get.JPG
    91.9 KB · Views: 136

Users who are viewing this thread

Back
Top Bottom