Code runs in design mode

K

karlman

I notice a small quirk that caused me some trouble. I can work around
it but was wondering if there is a better way.

I have a custom form that sets some of the user defined fields upon
opening. It does this differently whether it is a new item or existing
item. One of the fields I populate with the name of the current user.

I had a strange problem where my name was showing up on these forms in
production when I never touched it. Apparently what is happening is
when I open the form in design mode the code is executing and
populating this field. Later when I publish the form the field is
prepopulated with my name in that field upon every new instance of the
form.

Is there an easy way to prevent this?

Thank you!

Karl Albrecht
 
S

Sue Mosher [MVP-Outlook]

You can hold down the Shift key as you open the form to prevent its code from running. You may also want to check your field values on the All Fields page before you save as an .oft file backup or publish for production use.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
K

karlman

Thank you very much for your reply. I was hoping for a more permanent
setting because I am likely to forget either of those steps on
occasion. I will just make it part of what I check and make the code
able to deal with it.

Thank you

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top