Link to home
Start Free TrialLog in
Avatar of ebezold
ebezold

asked on

DataCombo never Refills

Hi guys, I need help

I have a DataCombo filled with Customer Codes and Names; BoundColumn is the code and ListField is the name. When a new customer was added I need to show it on the DataCombo. I have tried the following:

CboCustomer.Refill
CboCustomer.BoundText = strNewCustCode

The RowSource is a runtime-created ADODB.RecordSet and the Customer have added executing Inserts to the database (SQLServer 7.0) before the cboCustomer.Refill

I must be doing something bad because cboCustomer doesnt have the new Customer after the Refill call.

Tnx for any help!
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Set the combo DataSource property to Nothing then Rebind the recordset to the combo.
Avatar of D_M_D
D_M_D

Just call the same code you use to populate the combo at runtime...Just do this first...

cboCustomers.Clear

Then call the code you use to populate the combo at runtime.

--------
D_M_D
Avatar of ebezold

ASKER

It appears that ReFill method isn't useful?
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ebezold

ASKER

I never knew about that bug... Has MS published it?
If so, send the link to me: edubezter1@hotmail.com

Tnx a lot, you have the points
Avatar of ebezold

ASKER

Hey DMD, emoreau:

The first 2 answers were good. I've tried both and worked fine. Unfortunately I had to give the points to just one of you both.

Tnx