#  Other Applications & Softwares  > Access Tables & Databases >  >  Change Textbox value with and updateable combobox.

## danny2000

I'm trying to get a combobox to do two things.  

1 - When I change combobox1 (sourced from the first column in table 1), a textbox is updated from the corresponding value in column 2 of the same table. 

2 - I want the combobox to be updateable so it amends  the value in the currently referenced by that combobox in the corresponding table it is referencing.  Basically I want to be able to *manually* amend the value in the combobox and have it update Table1.

I achieve step 1 by using an event in the *'After Update'* event of combobox1. The code is below.  This works fine providing I set the *column count* to 2 in the combobox1 properties.  So what happens is, when I change the value in the combobox it updates the textbox with the corresponding value in Table1.




```
Please Login or Register  to view this content.
```



The problem I'm having is this.  I am unable to update the value in the combobox manually.  Obviously this clashes with the 'After Update' event.  I would like the combobox to be used for both selecting values (using the dropdown feature of a combobox) and used as a manual input field in a userform to update a table.  

Any clues as to whether this can be achieved.  Should I not be using an event in this case?  

Thanks very much.

----------


## davegugg

In what way are you unable to update the value in the combobox manually?  What is your code that currently attempts this?  You should be able to either do this with a simple UPDATE SQL statment or by opening the table as a recordset and updating the record.

----------


## danny2000

> In what way are you unable to update the value in the combobox manually?  What is your code that currently attempts this?  You should be able to either do this with a simple UPDATE SQL statment or by opening the table as a recordset and updating the record.



Thanks for that.  Ultimately that's the conclusion I have come to as well.

----------

