Databound combo boxes don't populate text field after Find 
Author Message
 Databound combo boxes don't populate text field after Find

Hi,

I have a couple of combo boxes that are bound to an ADO recordset.  After a
"Find" is done, i.e. adoRS.Find(field), the textbox fields are populated,
but not the combo boxes.  When I tried putting a couple of temp text boxes
on the form and set them to the datasource and the datafields to the same
fields as the combo boxes, they were populated after the find.

Does anyone know what the problem might be?  How can I get the fields
populated?

Thanks for any help.

John Yager



Tue, 20 Jan 2004 06:11:20 GMT  
 Databound combo boxes don't populate text field after Find
John

1) If its datacombo
then
datacombo.RowSource = recordset
datacombo.ListField=somefield

2) if it is Combobox, then you have to populate it with AddItem command

Sukesh


Quote:
> Hi,

> I have a couple of combo boxes that are bound to an ADO recordset.  After
a
> "Find" is done, i.e. adoRS.Find(field), the textbox fields are populated,
> but not the combo boxes.  When I tried putting a couple of temp text boxes
> on the form and set them to the datasource and the datafields to the same
> fields as the combo boxes, they were populated after the find.

> Does anyone know what the problem might be?  How can I get the fields
> populated?

> Thanks for any help.

> John Yager



Tue, 20 Jan 2004 11:45:27 GMT  
 Databound combo boxes don't populate text field after Find
Thanks, but  I found another solution by using textboxes to display the data
when the user is viewing data, and then switching them with the combo boxes
when they are editing.  This seems to work well.

Thanks again.


Quote:
> John

> 1) If its datacombo
> then
> datacombo.RowSource = recordset
> datacombo.ListField=somefield

> 2) if it is Combobox, then you have to populate it with AddItem command

> Sukesh



> > Hi,

> > I have a couple of combo boxes that are bound to an ADO recordset.
After
> a
> > "Find" is done, i.e. adoRS.Find(field), the textbox fields are
populated,
> > but not the combo boxes.  When I tried putting a couple of temp text
boxes
> > on the form and set them to the datasource and the datafields to the
same
> > fields as the combo boxes, they were populated after the find.

> > Does anyone know what the problem might be?  How can I get the fields
> > populated?

> > Thanks for any help.

> > John Yager



Wed, 21 Jan 2004 06:18:39 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Unable to populate text box from combo box

2. populate text box from combo box (same form)

3. Populating a combo box from another combo box

4. Populate a combo box from another combo box selection

5. how-to populate combo box with field from another table

6. populating a combo box with an external text file

7. Populating a combo box from a text file

8. Combo boxes don't default to current value

9. NEEDED:Multi Column Databound List Box or Combo Box

10. Can't get Combo Box selection into Text Box

11. Save Text Boxes Values To Combo Box's Item

12. Finding multiple text and writing macro to populate property fields

 

 
Powered by phpBB® Forum Software