IIF does not work if outlook is open

swmorin

Registered User.
Local time
Today, 01:14
Joined
Jan 10, 2012
Messages
66
Below is the IIF statement I have as the control of text box. If Microsoft outlook is closed it works perfectly. If Outlook is open then it does not work until the user mouses over the text box. Is the a known glitch?

Code:
=IIf([Forms]![frm_instructor_profile]![frm_instructor_course_info]![frm_instructor_course_info_sub1]![Text12]<[Forms]![frm_instructor_profile]![frm_instructor_course_info]![frm_instructor_course_info_sub1]![Text16],"CAN'T TEACH","GOOD TO GO")
 
Just a little more information. Are you opening Outlook as an object from your Access application?
 
no it is just open. If I close it the IIF works, but if Outlook is running it does not
 
Is this Outlook 2010?
I can't open Outlook at this site. Hopefully someone else can validate this.
http://technet.microsoft.com/en-us/library/ee857085.aspx
Outlook 2010 appears to have some new protection against scripts.
It would be interesting to know if Outlook starts up and references a different version of the VBA Library for security reasons or in some way is affecting things.

With the Outlook open and Access code window open, in the Immediate window will a IIF script run?
example: ? iif(true, "True result", "False result")
Entering this in the Immediate Window should print True result
 
It does work in the immediate window. It also can work with outlook open but the user has to hover over the control. If the user hovers over the control to quickly it will evaluate incorrectly. However, if it the user hovers over each block slowly it will work.

If out look is closed it evaluates and loads instantly. The problem has been recreated on 5 different machines
 
Again, I don't have Outlook to evaluate this, so anyone jumping in to help here would be welcome. It appears that the IIF can work OK, but there is a condition where it has problems.
Please provide a little more detail about "the user has to hover over the control. If the user hovers over the control to quickly it will evaluate incorrectly."
Is the IIF code used with a Mouse Over or some related event?
Or is it used for example in a Command Button's Click Event?
 
The IIF is not associated with a mouse over. It is the control source of a textbox in a continous form. It evaluates to fields that are part of the record.

The mouseover is the glitch. With outlook open the text boxes remain blank until the user hovers over them.

If outlook is open and the user hovers over the records to quick the IIF statements may or may not evaluate correctly.

If outlook is open and the user hovers to one record and pauses and hovers to the next and pauses and so on and so on it will evaluate correctly, but each text box will remain blank until the user hovers over it.

When Outlook is closed it loads instantly when the form loads
 
Here is something for you to try, but it is not a solution. It might determine the cause.
With both Outlook and Access running, open task manager.
On the applications tab, locate each - and left click "go to process" It will highlight the process on the next tab Processes. Again, left click. From here, set the Priority on Access to one or 2 steps higer (don't use RealTime). Likewise, set Outlook one or two lower.
My theory is that Outlook is constantlly polling the proceses and robbing Access of its quality time. If your problem goes away or is "less bad" then this might prove the resource pooling.
While this might not be a solution, the evaluation might provide a key to the options.
 
Not sure if this is problem as access is at a higher priority than outlook.
 

Users who are viewing this thread

Back
Top Bottom