check box

  • Thread starter Thread starter Jay
  • Start date Start date
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
 
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
 
Back
Top