check box

J

Jay

Custom Task Form - I set up a check box to grab a value
from field A and populate field B. Then I manually type
in something to the end of field B. When I put my cursor
in field C, field B resets the value back to field A. How
can I manually type in something to the end of field B and
have it stick?

I am doing something like this:

Dim ins
Dim pgs
Dim pg
Dim prps
Dim ctls

Sub Item_CustomPropertyChange(ByVal strName)

Set prps = Item.UserProperties

If prps("ShipingSameAsMailing") = True Then
Set ins = Item.GetInspector
Set pgs = ins.ModifiedFormPages
Set pg = pgs("PM")
Set ctls = pg.Controls

ctls("TextBox79").Value = ctls
("TextBox54").Value
End If

End Sub

Thanks,
Jay
 
S

Sue Mosher [MVP-Outlook]

Outlook is doing exactly what you told it to do -- setting field B based on
the value of another field. You need to think about the business logic of
your application: Under what conditions should Outlook *not* update field B?

Once you figure that out, you can rewrite your CustomPropertyChange event
handler. See http://www.outlookcode.com/d/propsyntax.htm for information on
the proper syntas -- you need to add a Select block to handle changes only
for those properties that you're interested in. Right now your routine is
running any time any custom property changes. That page will also show you
best practices on setting the value of properties rather than controls
 

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

Similar Threads

Please help with Function Item_Open() 1
Change background 1
read only 1
Too slow 2
Split Varible 5
check box 1
populating excel file from custom form 1
Use field in outlook custom form to populate excel sheet 1

Top