form with a combo box question

  • Thread starter rsbutterfly16 via AccessMonster.com
  • Start date
R

rsbutterfly16 via AccessMonster.com

hi guys, I have two tables in my form one used as a source (contracts ) and
then the other one used for destination (Destination).

basically my two tables have the same columns:
contract id, contract type and contract name.

what i need to figure out is that in my data entry form i have a combo box
that list all my contract ids. when a user selects a contract id to
automatically filled my texbox with the contract type.

can someone help please
 
J

Jeff L

Make the row source of the combo box
Select ContractID, ContractType
From YourTable

Make the Bound Column = 1
In the After Update event of the combo box put:
Me.ContractTypeField = Me.ContractIDField.Column(1)

Use the the names for the fields that you used in the line above.

Hope that helps!
 
R

rsbutterfly16 via AccessMonster.com

thank you ..... my contract Id combo box is coming from a query so this is
what i tried

Private Sub combo_contractquery_AfterUpdate()
Me.Contract_Type = Me.combo_contractquery.Column(1)
End Sub


I added a contract_type combo box in the form (i don't really need to see it)
as long as the correspondant contract type comes out in my destination table.


but it does not work... the combo box comes out empty.. is there any else i
should do?
 
R

rsbutterfly16 via AccessMonster.com

got it to work thanks!!
thank you ..... my contract Id combo box is coming from a query so this is
what i tried

Private Sub combo_contractquery_AfterUpdate()
Me.Contract_Type = Me.combo_contractquery.Column(1)
End Sub

I added a contract_type combo box in the form (i don't really need to see it)
as long as the correspondant contract type comes out in my destination table.

but it does not work... the combo box comes out empty.. is there any else i
should do?
Make the row source of the combo box
Select ContractID, ContractType
[quoted text clipped - 7 lines]
Hope that helps!
 

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