Combo Box values resetting

A

adammfellows

Hi

I have created a custom outlook form which contains several combo
boxes. These are populated from an Excel spreadsheet. An example of
part of the code is:

set xls = GetObject("N:\CentralProcurement\ProcurementFormData.xls")

set wsh = xls.worksheets("Clients")
for each r2 in wsh.usedrange.rows
cts("cmbRecharge").additem r2.range("A1").value
next ' r2


Three of the combo boxes are dependent on one another, so the choice
made in the first combo box determines what is loaded from Excel into
the list of available items in the second combo box. The choice made
here determines the list for the third combo box. Because of this and
the fact that the lists of values are loaded from Excel when the form
runs, I noticed that it was impossible to get this to work if the combo
boxes were bound to a field. I checked a few groups and the Microsoft
site and found that this is indeed the case.

I therefore had to have these combo boxes as unbound but populate
separate text boxes (which are bound to fields) when a choice is made.
This is because I found that the combo boxes would be blank when the
emailed form arrived in the recipients inbox.

This all works fine when I run the form from my personal forms library.

However, when the form is published to the Organizational Forms Library
on our Exchange Server, it no longer works correctly. The combo boxes
upload lists from Excel as they should, and each is dependent on the
one before. However, when the form is then sent, and the recipient
opens the mail, the combo boxes and the text boxes they populate have
all reverted to the first item in their dropdown lists rather than
showing what the sender of the form selected.

There are some other combo boxes on the form that are not dependent on
other combos, and so these are bound to fields (but still populated
from Excel) and the same problem occurs with these too.

I have tried everything I can think of, does anyone have any ideas?
 
H

Hollis Paul

However, when the form is published to the Organizational Forms Library
on our Exchange Server, it no longer works correctly. The combo boxes
upload lists from Excel as they should, and each is dependent on the
one before. However, when the form is then sent, and the recipient
opens the mail, the combo boxes and the text boxes they populate have
all reverted to the first item in their dropdown lists rather than
showing what the sender of the form selected.

There are some other combo boxes on the form that are not dependent on
other combos, and so these are bound to fields (but still populated
from Excel) and the same problem occurs with these too.

I have tried everything I can think of, does anyone have any ideas?
You want to save the index values of the various combo-boxes to custom
fields, then, in the Item-open event, reset the selected value of the
combo-box from the saved index field.
 

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