I have an edit form that when the txtbox for the zip code is changed/entered,
I would like to have cboArea update automatically. I have put the following
in the On Exit of the txtbox;
Me.cboArea = Me.cboArea.Column(1)
Column 1 (starting with 0) is the column I want to have added/updated. Also
tried the above code line in the On Current of the edit form. Neither of
these are working. Am I missing something?
Thanks for reviewing this.
... John
Ken Snell (MVP) - 31 Dec 2007 18:09 GMT
A combobox's columns come from the RowSource query for that combobox. You
cannot change the data in the form itself for the combobox's Columns. You
must change the data in the table, then requery the combobox so that it
displays the updated data. This also will cause the combobox to be "reset"
to the first value in the list, so you might need to also run code to set
the combobox to the desired value after the requery.
To give more specific suggestions, you'll need to give us more details about
what your form's purpose and use are.

Signature
Ken Snell
<MS ACCESS MVP>
>I have an edit form that when the txtbox for the zip code is
>changed/entered,
[quoted text clipped - 12 lines]
>
> ... John
Beetle - 31 Dec 2007 18:11 GMT
Usually you just requery the combo box to update it.
Me.cboArea.Requery
HTH

Signature
_________
Sean Bailey
> I have an edit form that when the txtbox for the zip code is changed/entered,
> I would like to have cboArea update automatically. I have put the following
[quoted text clipped - 9 lines]
>
> ... John
John W. Vinson - 31 Dec 2007 18:21 GMT
>I have an edit form that when the txtbox for the zip code is changed/entered,
>I would like to have cboArea update automatically. I have put the following
[quoted text clipped - 9 lines]
>
>... John
This is making no sense to me. You are setting the value of cboArea to the
value of cboArea???
Do you need to use the combo's Not In List event, or what? What's the
Rowsource of the combo; its Control Source; and the bound column?
John W. Vinson [MVP]