combo box and text box

  • Thread starter Thread starter Fuzuy
  • Start date Start date
F

Fuzuy

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

Thank You. It works nicely with both on current event for the form and
after update event for the combo box.

Fuzuy
 
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
 
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top