View Single Post
  #2  
Old April 28th 08, 03:34 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Combo Box list problem

If the form runs code when you use Run This Form in design mode, but doesn't run code after you have sent or saved an item using the published form, you probably have done something to "one-off" the form. Outlook will not run code on one-off forms; see http://www.outlookcode.com/d/secforms.htm for more information on this issue.

To ensure that a form does not one-off:

-- Make sure the "Send form definition with item" box on the (Properties) tab of the form is *not* checked. [1]

-- For in-house corporate use with Exchange Server, publish the form to the Organization Forms library or a public folder's forms library, as appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal Forms library. Save it as an .oft file and send it to other people who need to use it with instructions to publish it with the same form name that you used.

-- Set the Forward action on a custom form's (Actions) page to the published custom form.

Many other things can cause one-off forms. If the above steps don't work on a new item created with your form, see http://www.outlookcode.com/d/formpub.htm#oneoff for other possible causes.

[1] Whenever you publish a message form, Outlook will suggest that you may want to check the "Send form definition with item" box to ensure that the recipient will have the form, especially if you're sending to someone via the Internet. In the current Outlook security environment, this suggestion is obsolete. Ignore it unless your form has no code behind it.


--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


wrote in message ...
Hi,

I have a form that populates several combo boxes from an Excel
spreadsheet. This has worked correctly for some months now. However,
I recently removed an unrelated text box and have found that the combo
boxes are now blank and are not being populated.

I initially assumed that this had caused a problem and that I would
need to change some of the code. However, The strange thing is, if I
select the published form from the "Open forms" menu option in
Outlook, the combo boxes are blank, but if I then enter design mode
and then immediately run the form again, the combo boxes are now
populated correctly. Therefore I can't see what is wrong with the
form or code as such, since it does work if I run it in this way.

Any advice would be greatly appreciated!

Thanks very much,

Adam

Ads