Determine State

renenger

Registered User.
Local time
Today, 08:27
Joined
Oct 25, 2002
Messages
117
I am trying to determine the state that a job is located in. If the ProjectID begins with a 2 then it is in California. If it does not then the job is located in Nevada.

State: IIf(Left([tblMainFrontierUnits].[ProjectID],1)="2","CA","NV")

What is wrong with this statement? I am getting a compile error.
 
Is [tblMainFrontierUnits].[ProjectID] a string?
Is it possible that [tblMainFrontierUnits].[ProjectID] could be NULL or Empty?
 
The field cannot be null. It is a text value field.
 
Can the length of the field be less than 1 (I.E. empty)
 
Try running this query and see what it returns:
SELECT COUNT(*)
FROM tblMainFrontierUnits
WHERE ProjectID IS NULL
OR LEN(ProjectID) < 1
 

Users who are viewing this thread

Back
Top Bottom