• IIF statement (A2000)

    Author
    Topic
    #406568

    I need to translate this text box After Update event into an IIF I can run on an update query.

    Me![tbxCorrectedString] = ProperManager(Me![tbxUncorrectedString], Me![optgrpConversion])

    The value returned by the option group in this case would be vbProperCase. Is this statement below even remotely close?

    =IIf(IsNull([field1]), [field1], ProperManger([field1], VBProperCase)

    E

    Viewing 1 reply thread
    Author
    Replies
    • #844117

      You cannot use the symbolic constant vbProperCase in an expression, you must replace it by its numeric value 3. If you’re going to use it in an update query, you don’t need = before the expression. This should work (if ProperManager is a public function – it is not a built-in function AFAIK)

      IIf(IsNull([field1]), Null, ProperManager([field1], 3)

    • #844118

      You cannot use the symbolic constant vbProperCase in an expression, you must replace it by its numeric value 3. If you’re going to use it in an update query, you don’t need = before the expression. This should work (if ProperManager is a public function – it is not a built-in function AFAIK)

      IIf(IsNull([field1]), Null, ProperManager([field1], 3)

    Viewing 1 reply thread
    Reply To: IIF statement (A2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: