refreshing a dblist control

I am using VB5 pro.
I have a form with a DBList Box, a control array of buttons and an edit box.
One of the buttons is used for save.
How do I update the DBList box with the new saved data when I press the save button?
I have tried the Refill and Refresh methods and can only update the listbox by closing and opening the form

Thankyou
Ivan
LVL 3
icareyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
You have to refresh the recordset from which your dblist is bound.
0
tg_georgeCommented:
'refersh the recordset by the command
rec1.requery
'assuming rec1 as the recordset name
'avoid database.resordsets.refresh as 'this refreshes all the open recordsets
0
DarkVirusCommented:
try:
DBList1.Refresh
or
DBList1.Refill
0
icareyAuthor Commented:
as I understand your answer, these are the methods I used without success.

To solve the problem I had to refresh the data control that the dblist is bound to.

Thanks
0
DarkVirusCommented:
you use data list bounded to data control?!?

type to bound you data list to recordset(something like ADODB.Recordset) and then Refresh & Refill will work.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.