Discussion Locked

Outlook forms Freeze

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a form for fleet entry and it is opened/Added by the Account form. I have added to the fleet form a custom property change procedure to evaluate what model the truck is and put in the class. When I run my fleet form by itself it works perfect, but when it is opened from the first form it seems to work then freezes.
There is not enough room for all the code so here is the code I added(seems to be causing the problem). If you need to see more I can send it to you as a text file.

Sub Item_CustomPropertyChange(txtModel)

On Error Resume Next

strTest=Item.GetInspector.ModifiedFormPages("Fleet Entry").txtModel.Text
'msgBox strTest & "Prop changed fired" for testing

'msgBox strTest & "1st part fired" for testing

strResult=Ucase(Mid(strTest,1,1))
msgBox strResult & " " & "Result" 'This is for testing

'msgBox strResult & "" & "deciding" 'For testing
Select Case strResult

Case "E"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class One"

Case "J"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class One"

Case "R"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class Two"

Case "V"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class Two"

Case "N"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class Two"

Case "W"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class Three"

Case "B"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class Three"

Case "C"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class Three"

Case "T"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class Three"

Case "S"
Item.GetInspector.ModifiedFormPages("Fleet Entry").txtClass.Value= "Class Four"

Case "H

3 replies

by dennisbv

Juan did give me the answer. So here is what was happening
The procedure change kept getting called anytime anything was done on the form. So I split it off and made it that if the item that changed was Model then it would call the rest of the code else it would exit the sub.

This discussion is closed to new replies.