Problem With Iif Syntax

maniatis

Registered User.
Local time
Tomorrow, 00:27
Joined
Sep 22, 2005
Messages
31
The Thing I Want To Do Is:
When Two Fields In A Form Are Equal Then In Another Text Box It Shows Me A Message And I Write The Following Syntax In The Expression Box:
=iif([c_case_date]=[c_case_la], "vessel", " ")
And It Says Wrong Syntax.
Could You Correct Me Why Isn't Working?
I Use Access 2003 With Service Pack.
I Tried An Example Of This Expression To My Home Pc And It Works.
 
You should write

if ([c_case_date].value = [c_case_la].value)

What does "vessel" do?
 
I Just Want To Show Me Message Vessel When The Two Values Are Equal
 
Errors that occur on one PC but not on another are invariably caused by references issues. Search here for "missing reference" if you don't know what I'm talking about or how to fix the problem.
 
Pat Hartman said:
Errors that occur on one PC but not on another are invariably caused by references issues. Search here for "missing reference" if you don't know what I'm talking about or how to fix the problem.

BY SAYING THAT IN MY HOME PC THE SYNTAX WORKS I DIDN'T WANT TO SAY THAT I USED IT IN THE SAME SAME DATABASE.I JUST TRIED THE SYNTAX IN A FORM TO SEE IF THERE IS STH WRONG WITH THE SYNTAX. IF YOU WRITE CORRECT THE SYNTAX AND IT SAYS WRONG SYNTAX COULD YOU SUGGEST WHAT IS THE PROBLEM?THANX FOR YOUR HELP
 
We don't shout here.

I don't see anything wrong with the syntax.
 
Instead of a comma use a semicolon.
Regards
K
 

Users who are viewing this thread

Back
Top Bottom