A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Combo Box values resetting



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 27th 06, 05:17 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 14
Default Combo Box values resetting

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\ProcurementFormDa ta.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?

Ads
  #2  
Old October 27th 06, 11:24 PM posted to microsoft.public.outlook.program_forms
Hollis Paul
external usenet poster
 
Posts: 242
Default Combo Box values resetting

In article .com,
wrote:
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.

--
Hollis Paul
Mukilteo, WA USA


  #3  
Old October 31st 06, 05:01 PM posted to microsoft.public.outlook.program_forms
[email protected]
external usenet poster
 
Posts: 14
Default Combo Box values resetting

Hi

Thanks for that, it worked just great!

Regards

Adam


Hollis Paul wrote:
In article .com,
wrote:
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.

--
Hollis Paul
Mukilteo, WA USA


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Amended] Cannot trigger OnChange event from inspector's command bar combo box tonyl Add-ins for Outlook 1 October 10th 06 12:10 PM
Cannot trigger OnChange event from inspector's command bar combo box tonyl Add-ins for Outlook 0 October 10th 06 09:23 AM
UserProperties and Combo-type controls Simon Woods Outlook and VBA 4 April 19th 06 07:07 PM
Populate a combo box Steffkm Outlook - Using Forms 4 March 14th 06 09:28 PM
Update TO field based on combo box selection Lisa Outlook - Using Forms 0 March 2nd 06 05:42 PM


All times are GMT +1. The time now is 08:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.