I write a program but now got a problem. Everyone can help me.
And this problem:
+ I have 2 form.
- Form 1 have 3 combobox with some item load from database Access.
- Form 2 load data when change item at combobox form 1.

I close form 1 and re-open this form but all item i loaded from database Access lost all . I try using Me.Hide(), Me.Dispose(False) or change Shutdown mode in Project Properties but is not right :(.

I want when i close form 1 and re-open form 1, all data in this form like combobox or some control like that not lost data :-/.
Everyone can help me. Thanks all!

p/s: My English is not well, i'm sorry about that :$!.

Recommended Answers

All 5 Replies

hmmmm...
if u have already tried using me.hide,

then there are two ways that i can think of :

1st :

using "form1.showdialog()" instead of "form1.show()"
that will preserve values..


OR
2nd:

store values in registry on the event "form1.closing"
and read those values on formload event

Why not store the items of each ComboBox into an ArrayList and .Close the Form if no use for it?

that can be useful if u dont want to preserve values even after the application closes..

thanks you for read this topic!

>>thanks you for read this topic!
Anything else we can do to waste our time and get no.input back on the input we posted?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.