Combo box help

G

Guest

On Wed, 27 Oct 2004 10:39:04 -0700, babs wrote:
Below is a copy of previous help I received. It works for the most part.
Except the County gets put into the drop down box and the rate is fine but
when I move off the record and come back to it - The rate is still there but
the county (drop-down) field is BLANK. It needs to hold the value selected.
PLEASE Help not sure why this is happening.

I did what was suggested below back at the end of OCT.
Thanks,
Barb
I have a combo box set up that lists a rate,state,county. I need to select
the rate based on the county. I have bound the rate because that is the
value that needs to be stored. However, to find the correct state and county
I need to do toooo much scrolling. Help.
Can Iset up a combo box to jumbo to the county as I type it even though the
value I want to store is the rate.-

WOULD PREFER NOT TO SCROLL

Thanks,
Barb

Do it a bit differently.

To store the rate in the table, use a text control bound to the Rate
field in your table. You can lock it if you don't want the user to be
able to change the rate.

Add an Unbound combo box to the Form.
As Rowsource, something like this:
Select County, State, Rate from YourTable Order By County;

Leave this combo's Control Source empty.

Set the Column Count property to 3
Set the Combo Widths property to
1";0.5",0.5" (or whatever size works for you).

Set the Combo AutoExpand property to Yes.
Set the LimitToList property to Yes.

Code the Combo Box AfterUpdate event:
[RateControl] = Me!ComboName.Column(2)

The Combo will display the Counties in the first column, the
associated State in the 2nd column and the rate in the 3rd.
Find the correct county/state, select it, and the rate will appear in
the text control.
 
B

Brian

babs said:
On Wed, 27 Oct 2004 10:39:04 -0700, babs wrote:
Below is a copy of previous help I received. It works for the most part.
Except the County gets put into the drop down box and the rate is fine but
when I move off the record and come back to it - The rate is still there but
the county (drop-down) field is BLANK. It needs to hold the value selected.
PLEASE Help not sure why this is happening.

I did what was suggested below back at the end of OCT.
Thanks,
Barb

Set the combo box's Control Source to Rate. Set it's Bound Column to 3.
Remove the code from AfterUpdate event, you don't need it.
 
G

Guest

I did what the last advice said. I thought it
worked fine however. sometimes it works and sometimes what you type and or
click on is not what gets put into the County field- just want to be able to
select the county . It puts in a county different then I click or even
differnt from what I type. (have it displayed in the county field) even when
move off
of it and have the rate that goes with it be in the rate text box.
 
B

Brian

babs said:
I did what the last advice said. I thought it
worked fine however. sometimes it works and sometimes what you type and or
click on is not what gets put into the County field- just want to be able to
select the county . It puts in a county different then I click or even
differnt from what I type. (have it displayed in the county field) even when
move off
of it and have the rate that goes with it be in the rate text box.

:

I do not understand your reply. Have you done what I suggested?
 

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