I am working on a database that someone else created and the following expression is being used in a query:
TPT1Date: IIf(Mid([RECV_TPT1],3,1)="-",DateValue([RECV_TPT1]),IIf([RECV_TPT1]="null",Null,IIf(Mid([RECV_TPT1],5,1)="-",DateValue(Mid([RECV_TPT1],6,2) & "/" & Mid([RECV_TPT1],9,2) & "/" & Mid([RECV_TPT1],1,4)),[RECV_TPT1])))
When I try to run the query I get an error message that:
"Data type mismatch in criteria expression."
TPT1Date: IIf(Mid([RECV_TPT1],3,1)="-",DateValue([RECV_TPT1]),IIf([RECV_TPT1]="null",Null,IIf(Mid([RECV_TPT1],5,1)="-",DateValue(Mid([RECV_TPT1],6,2) & "/" & Mid([RECV_TPT1],9,2) & "/" & Mid([RECV_TPT1],1,4)),[RECV_TPT1])))
When I try to run the query I get an error message that:
"Data type mismatch in criteria expression."