Refresh Listbox

D

Doug MacDonald

I have a listbox bound to a table. When I update the
table data in VB the new value doesn't get displayed in
the listbox until I scroll the record out of and back into
view.

I have discoverd that if I reload the RowSourceType
with "Table/Query" programmatically after updating the
table the new data is displayed in the listbox.

Is there a better or more standard way to refresh a bound
listbox after updating the table?
 
A

Al Borges

Hi Doug:

Don't knock the reloading the RowSourceType method... it works.

Another method, though that has worked for me:

If Me.NewRecord = -1 Then
Me![List31].Requery
End If
'now join your listbox to the current record on your form
[List31] = [TEST]
[TEST].SetFocus
Me.Refresh
Exit Sub

Regards,
Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top