COMBO BOX HELP

  • Thread starter RIDEMNSLIDEM via AccessMonster.com
  • Start date
R

RIDEMNSLIDEM via AccessMonster.com

I am wanting to enter a field into my table. I have a combo box with this
statement =cboInspector.column(1). This looks to a query I have with
"inspector" and "district" fields. The box populates correctly and looks
good on the form when I enter the inspection reports. The problem comes when
I need to change the inspector's district. I have a column in my table for
the "district" data, but it does not populate to the table. What am I
missing?? thanks tracy
 
M

Marshall Barton

RIDEMNSLIDEM said:
I am wanting to enter a field into my table. I have a combo box with this
statement =cboInspector.column(1). This looks to a query I have with
"inspector" and "district" fields. The box populates correctly and looks
good on the form when I enter the inspection reports. The problem comes when
I need to change the inspector's district. I have a column in my table for
the "district" data, but it does not populate to the table.


To get the form to save a value, you need a bound control
for the field. Your problem is that your text box has an
expression instead of the field name. To do what you want,
you need to bind the text box to the field and use a line of
code to set its value. The code in the combo box's
AfterUpdate event would be like:

Me.thetextbox = Me.cboInspector.column(1)

If the text box is visible, enabled and not locked, you
could edit the value after the combo box item was selected.
 
R

RIDEMNSLIDEM via AccessMonster.com

Ok, that all makes since. But how do I get my query to run. It contains the
Inspectors and Districts. I use that to decide what district Joe Blow is.
Is there a code that I can write to have the query to run before the combo
box statement?

Tracy
 
R

RIDEMNSLIDEM via AccessMonster.com

Ok, that all makes since. But how do I get my query to run. It contains the
Inspectors and Districts. I use that to decide what district Joe Blow is.
Is there a code that I can write to have the query to run before the combo
box statement?

Tracy
 
R

RIDEMNSLIDEM via AccessMonster.com

Ooops, I figured out my problem. I was in AfterUpdate in the wrong box.
Thanks for the help...
Ok, that all makes since. But how do I get my query to run. It contains the
Inspectors and Districts. I use that to decide what district Joe Blow is.
Is there a code that I can write to have the query to run before the combo
box statement?

Tracy
[quoted text clipped - 14 lines]
If the text box is visible, enabled and not locked, you
could edit the value after the combo box item was selected.
 

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

Top