I built a query that works in Access 2000 (A2k), but not in Access 97(A97).
In A2K I used the Convert Database, Prior Access Database Version. So I could use the DB in A97 on another PC.
Here is the code in the query field:
zipformat: IIf(Len([ZipCode])>5,Left([ZipCode],5) & "-" & Right([ZipCode],4),Left([ZipCode],5))
What the Iff statement is saying is:
If the length of the zipcode field is greater than 5, then place the "-" between the 5th and 6th digit of the zipcode field,
else
just display the first five digits of the zipcode.
end if
This works fine in Access 2000. In Access 97 the code passes the vaildation (ie. I can save the query with out an error msg), but when I display the results in Datasheet view I get the #ERROR in the zipformat field.
I sure would appreciate anyones help.
In A2K I used the Convert Database, Prior Access Database Version. So I could use the DB in A97 on another PC.
Here is the code in the query field:
zipformat: IIf(Len([ZipCode])>5,Left([ZipCode],5) & "-" & Right([ZipCode],4),Left([ZipCode],5))
What the Iff statement is saying is:
If the length of the zipcode field is greater than 5, then place the "-" between the 5th and 6th digit of the zipcode field,
else
just display the first five digits of the zipcode.
end if
This works fine in Access 2000. In Access 97 the code passes the vaildation (ie. I can save the query with out an error msg), but when I display the results in Datasheet view I get the #ERROR in the zipformat field.
I sure would appreciate anyones help.