Hi, All:
I have a form, it contains a combo box it displays three columns, a
Table/query was used as a row source, it has two text boxes contain
coulmn(1) and column(2) values of combo box, separately.
However,I encountered a difficulty that the column values of a combo
box would only show the first listing row values, it won't dynamically
changed as I click on the rest of other rows?
What a trivial mistake I had? please help!
Thanks.
Ron2006 - 28 Nov 2007 22:55 GMT
I usually force the txt boxes to have column values in two places, -
Identical code.
On Current event for the form
After Change event for the combo box.
code is
me.txtbox1 = me.comboboxname.column(1)
me.txtbox2 = me.comboboxname.column(2)
Ron
John W. Vinson - 29 Nov 2007 00:36 GMT
>After Change event for the combo box.
I'd suggest the AfterUpdate event instead. It fires when a row has been
selected - the rather misleadingly named Change event fires at every
keystroke.
John W. Vinson [MVP]
Fuzuy - 29 Nov 2007 13:01 GMT
On Nov 28, 7:36 pm, John W. Vinson
<jvinson@STOP_SPAM.WysardOfInfo.com> wrote:
> >After Change event for the combo box.
>
[quoted text clipped - 3 lines]
>
> John W. Vinson [MVP]
Thank You. It works nicely with both on current event for the form and
after update event for the combo box.
Fuzuy
Ron2006 - 29 Nov 2007 13:29 GMT
John,
You are right about the afterupdate event. And indeed that is where I
always put it. I guess I just had change on my mind when I wrote
afterchange.
Thank you for the catch.
Ron
John W. Vinson - 29 Nov 2007 18:42 GMT
>You are right about the afterupdate event. And indeed that is where I
>always put it. I guess I just had change on my mind when I wrote
>afterchange.
I figured it was just a momentary brainfade... a phenomenon with which I am
becoming all too familiar myself!!!
John W. Vinson [MVP]