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 / April 2008

Tip: Looking for answers? Try searching our database.

Combo Box list problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
adammfellows@liberata.com - 28 Apr 2008 14:01 GMT
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
Sue Mosher [MVP-Outlook] - 28 Apr 2008 15:34 GMT
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.

Signature

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

> Hi,
>
[quoted text clipped - 16 lines]
>
> Adam
adammfellows@liberata.com - 28 Apr 2008 17:42 GMT
Hi,

Thanks for your response.  Would "one-offing" the form cause all the
code on all tabs to cease to work?  The reason I ask is that there are
two tabs within the form and the code and combo boxes on the main
"message" form still work correctly, it is only those on a second tab
that are now blank.  If "one-offing" causes all code to stop working
then I don't think that can be the cause of the problem, but if it is
specific to only one tab, then it could be the cause.

Thanks for your help,

Adam
Sue Mosher [MVP-Outlook] - 28 Apr 2008 18:14 GMT
Correct, a one-off form cannot run code at all. It that's not the problem, then you need to examine your code to determine why the code that sets the combo box is being skipped.

Signature

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

> Thanks for your response.  Would "one-offing" the form cause all the
> code on all tabs to cease to work?  The reason I ask is that there are
[quoted text clipped - 3 lines]
> then I don't think that can be the cause of the problem, but if it is
> specific to only one tab, then it could be the cause.

"Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message news:OPThs1TqIHA.3900@TK2MSFTNGP05.phx.gbl...

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
<adammfellows@liberata.com> wrote in message news:c5d4f0de-26b3-4e6b-ac0b-d6865adc0d0f@x35g2000hsb.googlegroups.com...
> Hi,
>
[quoted text clipped - 16 lines]
>
> Adam
adammfellows@liberata.com - 29 Apr 2008 10:57 GMT
Hi,

Now that it seems that it's not "one-offed" I will check through the
code and see what I can find.  I'm still not sure why it works when I
run if using "Run this form" though, if the code is not correct.  But
then, on the other hand, that would suggest it has "one-offed", but it
can't have because some of the code does run.  All very confusing!

Thanks for your help,

Regards,

Adam
 
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



©2008 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.