Combo Box AutoFill/AutoSelect

G

Guest

NOt sure if its possible but I will throw it out there. When I have a combo
box I would like it to select A value rather then leave the combo box to be
selected. If i can i would like to look at the Combo Box, if there is only
one value in the list then auto select. If thats not possible, hopefully I
can look at the combo box and have the first value in the list be selected.

For Example
- I have a form
- Different fields on the form have combo box's
- The combo box's list of values changes depending on the value of a field
in the form. I.E. If under the Continent Combo Box you select North America,
under the Country Combo Box you could now only select Canada, USA, or Mexico.

*Now lets pretend there was only one country in North America: USA. Once
NOrth america is selected in the Continent Combo BOx, I would like the
Country Combo box to automatically show USA rather than have me select it.
 
G

Guest

Attach an event procedure - on After - Update - its one line of code
provided your combo selection is set up properly
I am assuming in your combo you have 2 fields ie north america and another
for USA(thus the column2) - there is a microsft KB article for auto fillin
or something of that nature

You'd do something like this....

Private Sub cboEmpLName_AfterUpdate()
[cbocontinent] = [txtcountry].Column(2)
End Sub
 
G

Guest

Will that actually Autofill the filled or just filter the combo box list

Gary said:
Attach an event procedure - on After - Update - its one line of code
provided your combo selection is set up properly
I am assuming in your combo you have 2 fields ie north america and another
for USA(thus the column2) - there is a microsft KB article for auto fillin
or something of that nature

You'd do something like this....

Private Sub cboEmpLName_AfterUpdate()
[cbocontinent] = [txtcountry].Column(2)
End Sub

jkurys said:
NOt sure if its possible but I will throw it out there. When I have a combo
box I would like it to select A value rather then leave the combo box to be
selected. If i can i would like to look at the Combo Box, if there is only
one value in the list then auto select. If thats not possible, hopefully I
can look at the combo box and have the first value in the list be selected.

For Example
- I have a form
- Different fields on the form have combo box's
- The combo box's list of values changes depending on the value of a field
in the form. I.E. If under the Continent Combo Box you select North America,
under the Country Combo Box you could now only select Canada, USA, or Mexico.

*Now lets pretend there was only one country in North America: USA. Once
NOrth america is selected in the Continent Combo BOx, I would like the
Country Combo box to automatically show USA rather than have me select it.
 

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

Similar Threads

Combo Box Help 7
Combo Box Question 4
Combo Box 3
Combo box based on another combo box 1
combo box filter 1
Combo box 1
First entry in combo 7
Combo Box Sync 5

Top