Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF Statement Help

Status
Not open for further replies.
Jan 22, 2003
92
0
0
US
I have an IF statement to compare one column in an Access db to another column in the same Access db. Please tell me what I am doing wrong!

IIF([tabname.informix_pubtablesd17]<>[tabname.informix_pubtablesd]),1,0)

IF tabname is not equal to tabname give me a 1 else give me a 0.
 
I'm not ABSOLUTELY certain on this, but I think you are missing a pair of brackets:

Try this:

IIF([tabname].[informix_pubtablesd17]<>[tabname].[informix_pubtablesd]),1,0)

IOW, the syntax is [table-name].[fieldname], not [tablename.fieldname]

I think...I've always done it that way, and otherwise, your expression looks ok... :)

jmh

Don't be sexist - Broads hate that!

Another free Access forum:
More Access help stuff at
 
or
([tabname].[informix_pubtablesd17]=[tabname].[informix_pubtablesd]) + 1

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top