Combobox question 
Author Message
 Combobox question

I have a form I use to input and search inventory data
from.  I want to add a combobox in place of a blank field
for quicker inputing of data.  I have it working fine for
inputting data but I am having trouble when I try and
display data I quieried in the combo box.  This is how I
am doing it now:

combobox1.SelText = recordsource.Fields.Item
("location").Value

When I search for an equipment record all other fields
show data except the combobox.

-Chris



Sun, 30 Jan 2005 04:36:51 GMT  
 Combobox question
Have you tried setting the ListIndex property after loading the combobox?

Example:

Do while not rs.eof
    combobox1.addItem rs.Fields("location")
    If rs.Fields("location") = selectedValue Then
        iIndex  = combobox1.ListCount
    End
Loop

  combobox1.ListIndex = iIndex


Quote:
> I have a form I use to input and search inventory data
> from.  I want to add a combobox in place of a blank field
> for quicker inputing of data.  I have it working fine for
> inputting data but I am having trouble when I try and
> display data I quieried in the combo box.  This is how I
> am doing it now:

> combobox1.SelText = recordsource.Fields.Item
> ("location").Value

> When I search for an equipment record all other fields
> show data except the combobox.

> -Chris



Mon, 31 Jan 2005 07:27:07 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ComboBox Question

2. ComboBox Question

3. ComboBox question

4. ComboBox question

5. combobox question

6. Combobox question

7. ComboBox question?

8. DataTable and ComboBox Question

9. Access vs VB ComboBox Question

10. Newbie ComboBox question

11. Combobox Question

12. ComboBox Question

 

 
Powered by phpBB® Forum Software