refresh listbox

F

fi.or.jp.de

Hi All,

I have excel userform, which is connected to access database.

I have customer details in access dabase.

I will search using excel userform, results are displayed in listbox.
I will select the listbox item and update the required details.

If I click save it saves to database. That is working fine.

What I need is, If click save it need to refresh the listbox item with
saved details.

Assumed i listbox showing status as pending, I click on that & change
it to completed. & Clicked save.

It will be updated in access database. I want to reflect the changes
in listbox after the update.


Is this possible. ??
 
J

joel

How is your listbox filled? Are you manually adding entries or usin
the linked cell property of the listbox.

1) If you are using a linked cell then you have to put the data ont
the worksheet for the listbox to get updated.

2) If you are adding the data into the listbox using code then you hav
to add the entry into the listbox using VBA code.

The listbox doesn't magically get updated without adding instructio
into your macro.
 
J

joel

Listboxes should automatically get updated if you are using Linked Cel
property. The problem may be the worksheet didn't get refreshed. D
you have screen updating turned off so the worksheet did get update
which probably means the linked cell didn't get updated.
 
F

fi.or.jp.de

I am not using linked cell.

the data will populated to listbox from access database.

Once i double click the selected listbox item, it will appear in the
above text boxes, then i will change
the required fields.
 
J

joel

When you save the data to the ACCESS database you should also write th
information to the Listbox. Don't wait until the list box is selected.
If you wait until the listbox is selected then you would have to searc
the database again and retrieve the information.


Is more than one person writing to the Access database while you
userform is running. if so, then you have to refresh the listbox fro
the database because somebody else maybe of changed the database and yo
want to present in the userform (listboxes) the latest data from th
database.

Before you write any more code come up with a concept and archecture o
what you need to do, then write the code.
 

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