![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
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 |
#2
|
|||
|
|||
![]()
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 |
#3
|
|||
|
|||
![]()
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 |
#4
|
|||
|
|||
![]()
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.
-- 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 ... 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. "Sue Mosher [MVP-Outlook]" wrote in message ... 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 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 |
#5
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
If then - do while - vlookup combo | csjames | Outlook and VBA | 1 | June 28th 07 10:18 PM |
Combo box | skar3000 | Outlook - Using Forms | 3 | June 15th 07 01:14 PM |
CommandBarComboBox problem: Text lost when combo box lost focus | Digambar Borse | Add-ins for Outlook | 0 | January 16th 07 09:47 AM |
Populate a combo box | Steffkm | Outlook - Using Forms | 4 | March 14th 06 08:28 PM |
Dropdown controls - List vs Combo | Don Smith | Outlook - Using Forms | 2 | January 20th 06 06:46 PM |