Hi I am having trouble with validation on exit of a form.
I have a form that has 3 controls involved somehow in the validation.
Cont1 is and amount being calculated depending on the users selection (using a query)
Cont2 is the same as above but over another table
Cont3 has a query over it which subtracts the results of the query bound to Cont1 from the result of the query bound to Cont2.
I have setup validation in a Macro attached to the exit button (there are several other commands in this macro) to return a message and cancel any further events where the result returned in Cont3 <>0
Problem at the moment is that I get a false returned in the Macro regardless of the result in Cont3 whereas I expect to only get a false returned when Cont3=0.
It am guessing it may be my reference syntax but I have tried a few different things. My current syntax is as follows.
[Forms]![MAIN FORM]![Cont3]<>0
I tried Forms![Main Form].Controls!Cont3<>0 also (Access adds brackets around Forms and Cont3).
Any ideas?
I have a form that has 3 controls involved somehow in the validation.
Cont1 is and amount being calculated depending on the users selection (using a query)
Cont2 is the same as above but over another table
Cont3 has a query over it which subtracts the results of the query bound to Cont1 from the result of the query bound to Cont2.
I have setup validation in a Macro attached to the exit button (there are several other commands in this macro) to return a message and cancel any further events where the result returned in Cont3 <>0
Problem at the moment is that I get a false returned in the Macro regardless of the result in Cont3 whereas I expect to only get a false returned when Cont3=0.
It am guessing it may be my reference syntax but I have tried a few different things. My current syntax is as follows.
[Forms]![MAIN FORM]![Cont3]<>0
I tried Forms![Main Form].Controls!Cont3<>0 also (Access adds brackets around Forms and Cont3).
Any ideas?