R
Randy
Hi,
I've got a listbox on a form that gets updated by opening another form
for data entry. Once the user enters the new item name and clicks
"accept", the data entry form closes and the original form with the
listbox displays. I'm having trouble getting the listbox to reflect
the additional entry. If I close the form and reopen it, the new item
displays just fine, but I know that there is a more direct way to
force the listbox to refresh then closing and reopening. Can anybody
help?
Here is the code that I am using to get the listbox to refresh (but it
is obviously not working):
With frmJobsItems 'this is the name of the form with the
listbox on it
.bsJobs.Dispose() 'the listbox is tied to a binding source
.dsTimesheets.Dispose() 'this is the dataset that the
bindingsource pulls from
.taJobs.Fill(frmJobsItems.dsTimesheets.Jobs) 'this is the
tableadapter that holds the data
End With
Any help is appreciated.
Thanks,
Randy
I've got a listbox on a form that gets updated by opening another form
for data entry. Once the user enters the new item name and clicks
"accept", the data entry form closes and the original form with the
listbox displays. I'm having trouble getting the listbox to reflect
the additional entry. If I close the form and reopen it, the new item
displays just fine, but I know that there is a more direct way to
force the listbox to refresh then closing and reopening. Can anybody
help?
Here is the code that I am using to get the listbox to refresh (but it
is obviously not working):
With frmJobsItems 'this is the name of the form with the
listbox on it
.bsJobs.Dispose() 'the listbox is tied to a binding source
.dsTimesheets.Dispose() 'this is the dataset that the
bindingsource pulls from
.taJobs.Fill(frmJobsItems.dsTimesheets.Jobs) 'this is the
tableadapter that holds the data
End With
Any help is appreciated.
Thanks,
Randy