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?
 
DarkVirusConnect With a Mentor Commented:
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
 
É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
All Courses

From novice to tech pro — start learning today.