adding and saving list box items programatically

S

Santiago Gomez

I have a list box where users can add their frequently used search strings.

how can I save the contents of the listbox so it stays even after the form
is closed and reopened?
 
G

Gerald Stanley

Here are a couple of suggestions

If you only want the contents for the duration of the
session, create a public string variable, load the contents
of the string into the list box rowsource property when the
form is loaded and save the rowsource property into the
global when the form is unloaded.
If you wish to keep the contents across multiple sessions
then create a table to hold the rowsource property. As
with the first suggestion, you will need to populate the
rowsource property when the form is loaded and update the
table when the form is unloaded.

Gerald Stanley MCSD
 

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