Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / October 2006

Tip: Looking for answers? Try searching our database.

Combo Box values resetting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
adammfellows@liberata.com - 27 Oct 2006 16:17 GMT
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?
Hollis Paul - 27 Oct 2006 21:25 GMT
> However, when the form is published to the Organizational Forms Library
> on our Exchange Server, it no longer works correctly.  The combo boxes
[quoted text clipped - 9 lines]
>
> 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.

--
Hollis Paul
Mukilteo, WA  USA
adammfellows@liberata.com - 31 Oct 2006 17:01 GMT
Hi

Thanks for that, it worked just great!

Regards

Adam

> > However, when the form is published to the Organizational Forms Library
> > on our Exchange Server, it no longer works correctly.  The combo boxes
[quoted text clipped - 17 lines]
> Hollis Paul
> Mukilteo, WA  USA
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.