Microsoft KB Archive/96993

{|
 * width="100%"|

ACC1x: GPF Using Invalid IIf As Control Source

 * }

Q96993

-

The information in this article applies to:


 * Microsoft Access 1.0

-

SYMPTOMS
If you use the IIf function as the ControlSource property of a form or report and do not provide the necessary parentheses around the parameter list, Microsoft Access may cause a general protection (GP) fault instead of returning an error message.

For example, the following syntax is incorrect and will cause a GP fault:

  =IIf IsNull([Fld]),&quot;NULL&quot;,&quot;NOT NULL&quot;

Note that the parentheses for the IIf function are missing. As soon as you try to leave the property setting, the GP fault will occur.

RESOLUTION
Ensure that all IIf functions include the required parentheses around the parameter list. The following syntax is a corrected version of the one displayed above:

  =IIf(IsNull([Fld]),&quot;NULL&quot;,&quot;NOT NULL&quot;)

STATUS
Microsoft has confirmed this to be a problem in Microsoft Access version 1.0. This problem was corrected in Microsoft Access version 1.1.

Keywords : kbusage

Issue type : kbbug

Technology :