Outlook 2003 bound textbox

Status
Not open for further replies.
D

Daniel

I have a bound textbox in the compose page and the read page. In my code I use customproperty to write to the textbox. I shows up in compose but it won't show up in read. Just to be sure I copied and paste the textbox in compose to read but with the same thing happening. The only thing I can think of is that there is something wrong with my code that is causing this but I don't know what. My code checks a set of bound checkboxes and adds a message to the subject textbox1.

Sub Item_CustomPropertyChange(ByVal Name)

set CheckAVG = Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "CheckAVG")

set CheckMas200 = Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "CheckMas200")

set CheckPopups = Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "CheckPopups")

set CheckVirus_Trojans = Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "CheckVirus_Trojans")

set CheckWindows = Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "CheckWindows")

set CheckOther = Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "CheckOther")

set TextOther = Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "TextOther")

set TextBox1 = Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "TextBox1")

Dim True1

Dim True2

Dim True3

Dim True4

Dim True5

Dim True6

Select Case Name

Case Name

If CheckAVG.Value = True Then

True1 = " AVG"

Else

True1 = ""

End If

If CheckMas200.value = True Then

True2 = " MAS200"

Else

True2 = ""

End If

If CheckPopups.Value = True Then

True3 = " Unexplained Popups"

Else

True3 = ""

End If

If CheckVirus_Trojans.value = True Then

True4 = " Virus/Trojans"

Else

True4 = ""

End If

If CheckWindows.Value = True Then

True5 = " Windows"

Else

True5 = ""

End If

If CheckOther.value = True Then

True6 = " Other"

TextOther.enabled = Item.UserProperties("Other")

TextOther.visible = Item.UserProperties("Other")

Else

True6 = ""

TextOther.enabled = Item.UserProperties("Other")

TextOther.visible = Item.UserProperties("Other")

End If

End Select

Textbox1.Value = "Computer Problems -" & True1 & True2 & True3 & True4 & True5 & True6

End Sub
 
S

Sue Mosher [MVP]

You shouldn't "write to the textbox" when a bound control is involved.

Instead, change the value of the bound property. Ditto the bound checkboxes:

Check the value of the property, not the control. The code is much simpler

and more efficient and usually can be debugged more easily.

Sue Mosher

"Daniel" <donotreply2me[at]yahoo[dot]com> wrote in message

news:%23SgP8IogKHA.2104@TK2MSFTNGP05.phx.gbl...
> I have a bound textbox in the compose page and the read page. In my code I
> use customproperty to write to the textbox. I shows up in compose but it
> won't show up in read. Just to be sure I copied and paste the textbox in
> compose to read but with the same thing happening. The only thing I can
> think of is that there is something wrong with my code that is causing this
> but I don't know what. My code checks a set of bound checkboxes and adds a
> message to the subject textbox1.

> Sub Item_CustomPropertyChange(ByVal Name)
> set CheckAVG =
> Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "CheckAVG")
> set CheckMas200 =
> Item.GetInspector.ModifiedFormPages.Item("Message").Controls(
> "CheckMas200")
> set CheckPopups =
> Item.GetInspector.ModifiedFormPages.Item("Message").Controls(
> "CheckPopups")
> set CheckVirus_Trojans =
> Item.GetInspector.ModifiedFormPages.Item("Message").Controls(
> "CheckVirus_Trojans")
> set CheckWindows =
> Item.GetInspector.ModifiedFormPages.Item("Message").Controls(
> "CheckWindows")
> set CheckOther =
> Item.GetInspector.ModifiedFormPages.Item("Message").Controls(
> "CheckOther")
> set TextOther =
> Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "TextOther")
> set TextBox1 =
> Item.GetInspector.ModifiedFormPages.Item("Message").Controls( "TextBox1")
> Dim True1
> Dim True2
> Dim True3
> Dim True4
> Dim True5
> Dim True6

> Select Case Name
> Case Name
> If CheckAVG.Value = True Then
> True1 = " AVG"
> Else
> True1 = ""
> End If

> If CheckMas200.value = True Then
> True2 = " MAS200"
> Else
> True2 = ""
> End If

> If CheckPopups.Value = True Then
> True3 = " Unexplained Popups"
> Else
> True3 = ""
> End If

> If CheckVirus_Trojans.value = True Then
> True4 = " Virus/Trojans"
> Else
> True4 = ""
> End If

> If CheckWindows.Value = True Then
> True5 = " Windows"
> Else
> True5 = ""
> End If

> If CheckOther.value = True Then
> True6 = " Other"
> TextOther.enabled = Item.UserProperties("Other")
> TextOther.visible = Item.UserProperties("Other")

> Else
> True6 = ""
> TextOther.enabled = Item.UserProperties("Other")
> TextOther.visible = Item.UserProperties("Other")
> End If
> End Select

> Textbox1.Value = "Computer Problems -" & True1 & True2 & True3 & True4 &
> True5 & True6

> End Sub

>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
J Outlook 2003 .pst Will Not Restore Completely to Outlook 2019 Using Outlook 5
D Outlook 2003 Mail Fails Using Outlook 1
D Wrong email address in Outlook 2003 "From" tab in new outgoing emails Using Outlook 4
V Outlook 2003 and Windows 11 Using Outlook 4
glnz Moving from Outlook 2003 to MS365 Outlook - need basics Using Outlook 4
I Outlook 2003 shows html code when To: field is empty Using Outlook 7
B Outlook 2003 email sending & receiving suddenly stopped working Using Outlook 3
H Outlook 2003 find by "has attachment" Using Outlook 1
glnz How set up new IMAP on Outlook-Office 365 and merge in pst from Outlook 2003 for same two email accounts? Using Outlook 5
P Import Categories from Outlook 2003 Using Outlook 8
V Outlook 2003 problem with Windows 10 Creators Update 1709 Using Outlook 0
M Outlook 2003 pictures - some visible, some not Using Outlook 0
S Outlook 2003 to Outlook 2013 pst file Using Outlook 5
O Memory Leak in Outlook 2003 Using Outlook 3
W Changing looks of emails in Outlook 2003 Using Outlook 0
O Outlook 2003 can't send, but settings seem OK Using Outlook 1
P URL Hyperlink not working correctly in Outlook 2003 Using Outlook 10
O Outlook 2003 can't open contacts. Using Outlook 2
O Promoting Outlook 2003 User Templates Using Outlook 1
O W-a-a-y too many PSTs (Outlook 2003) Using Outlook 0
J Outlook 2003-2010 PST Field Editor Using Outlook 1
P Outlook 2003 - Do I need a new profile? Using Outlook 2
E Want to Import Outlook 2003 pst files to later version Using Outlook 6
A error message outlook 2003 Using Outlook 1
B Seeking advice now Outlook 2003 is unsupported by Exchange Using Outlook 4
O Change Debit to Credit in Outlook 2003? Using Outlook 1
J problems downloading POP3 emails to Outlook 2003 Using Outlook 1
G Outlook 2003 VBA Won't Run In Outlook 2010 Outlook VBA and Custom Forms 4
P Outlook 2003 - possible to recreate corrupt account? Using Outlook 3
Calvyn Outlook 2003 cannot import .vcs subject Using Outlook 1
T Query about one aspect of migrating .pst files from Outlook 2003 to Outlook 2013 Using Outlook 5
C Outlook 2003 contacts Using Outlook 1
G Configuring Outlook 2003 for Gmail with both pop3 & imap4 accounts Using Outlook 1
M HELP--Extract Data from 2003 outlook transfer to excel spreadsheet Using Outlook 1
V Outlook 2003 editing problem Using Outlook 4
X Outlook 2003 not sending all of the new email message Using Outlook 1
2 How to use outlook 2003 calendar in always offline mode Using Outlook 0
G Outlook 2003 I need to move email to folder based on subject, using wild card Using Outlook 0
G outlook 2013 - Open In Outlook 2003 Using Outlook 1
A Exchange 2003 Outlook 2010 64 Bit- AutoDiscover Connection Err - Certificate Exchange Server Administration 9
T Use Outlook 2003 with Office 2013 Using Outlook 1
D Outlook 2003 contact folder opend in scrolled down position Using Outlook 2
O Need advice ASAP! Outlook 2003. Using Outlook 1
H Custom Contact form not working in Outlook 2003 Using Outlook 3
O Outlook 2003 forms problem Using Outlook 3
O Duplicate folders in Outlook 2003 Using Outlook 3
O Moving OUtlook 2003 from bad XP to Win 7 Pro 64 -- URGENT! Using Outlook 8
A File - Save Attachments does nothing in Outlook 2003 with Exchange 2010 ... Using Outlook 3
R Menus in a new\old email not there in Outlook 2003 Using Outlook 2
R OUTLOOK 2003 on WinXP, Prob: CONTACTS or ADDRESS BOOK not connected or missing Using Outlook 6

Similar threads

Top