Condition - cant parse expression

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have written a macro in the 'On Click' property of a command button of my
switchboard form. I am writing an expression into condition of one of the
rows in this macro. The condition look something like but is lengthier than:
Form![myForm]![txt1] is not null and
Form![myForm]![txt2]>=Form![myForm]![txt1]
This was working fine. But now I had to add one more element of [txt3] to
this conditional expresion by using 'And' operator. When I tried doing this,
it gives me an error message saying: MS Office Access cant parse expression :
Form![myForm]![txt1] is not null and
Form![myForm]![txt2]>=Form![myForm]![txt1] and Form![myForm][tx----->cut off

It is cutting off the expression that I wrote as if there was a limit to the
amount of text that one can write into an expression. Why is it giving that
error message?
 
Neeraj,

I think there is a limit of 255 characters allowed for a Condition
expression in a macro. However, the other problem might be that you
need an 's' on the Form! construct.

Is MyForm the same form that the command button that runs the macro is
on? If so, you will be able to simplify the expression by removing all
the [Forms]![MyForm] elements.
 
Back
Top