Auto fill text box

  • Thread starter Thread starter Edgar Chado via AccessMonster.com
  • Start date Start date
E

Edgar Chado via AccessMonster.com

Hi,

I am using a combo box which, after selecting an option automatically
fills a text box. In my case, I choose our clients name from the combo box
and it should automatically fill his telephone number in the text box.

The problem is the it does not fill it automatically. I have to click on
the text box and press enter so it can retrive the value.

I am using this code in the afterupdate event of the combo box.

Private Sub Productora_AfterUpdate()
Me.ID_Productora = Me.Productora.Column(2)
Me.Telefono_Productora = Me.Productora.Column(1)
End Sub

Any idea of what it could be happening???

Thanks in advance.
 
Hi, Edgar.

You do not need to use an AfterUpdate event to populate the textboxes.
Simply set their ControlSource to the appropriate column value:

=Me.Productora.Column(2)
=Me.Productora.Column(1)

Hope that helps.
Sprinks
 
Back
Top