
URGENT; VB ComboBox problems
My problem:
A combo-box in a program I am writing is INITIALLY filled with the
contents of a database table.
(The usual method for adding data to a combo-box is via the .AddItem
method, followed by
.ItemData(combobox.NewIndex) = 'whatever my value is' ; which is what
I'm doing.)
At one point in the course of this program, this combo-box may have to
display the contents of a database record in which 1 of the fields will
be equal to one of the original contents of this combo-box.
So, basically, I want to use this combo-box to display the contents of 1
field from a record, OR, to
set this same field.
(Lousy explanation?)
How do I do this?
I began by changing the combo-box's .Text property to the name of the
contents of the record's field.
Then, most likely, the .ListIndex property has to be modified. How?
Someone please help me. (also send me a reply to my e-mail account:
Thank-you,
Angelo
Another small question:
I want to save the name of a form, hide this form, display a second
form, then be able to re-display
the first whenever I want to.
Saving the active form is not a problem ( saved_form =
Screen.ActiveForm.Name).
How do I then display it whenever needed?