updating one field from another

  • Thread starter Thread starter JohnE
  • Start date Start date
J

JohnE

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
 
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.
 
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

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]
 
Back
Top