Function help please

J

jjacob

Function as copied from sql view

IIf(([dbo_Pr_EmpJobData_T]![dteEndRateDate]=9/9/9999),"
",[dbo_Pr_EmpJobData_T]![dteEndRateDate])

What I am wanting is if the date is 9/9/9999 then show nothing. But if it
is anything other than 9/9/9999 show me the data in the field.

When I run this all the fields show as nothing. help?
 
R

Rick Brandt

jjacob said:
Function as copied from sql view

IIf(([dbo_Pr_EmpJobData_T]![dteEndRateDate]=9/9/9999),"
",[dbo_Pr_EmpJobData_T]![dteEndRateDate])

What I am wanting is if the date is 9/9/9999 then show nothing. But
if it is anything other than 9/9/9999 show me the data in the field.

When I run this all the fields show as nothing. help?

Dates in Access need to be delimited with #.

IIf(([dbo_Pr_EmpJobData_T]![dteEndRateDate]=#9/9/9999#),"",[dbo_Pr_EmpJobData_T]![dteEndRateDate])
 
T

Tom Lake

jjacob said:
Function as copied from sql view

IIf(([dbo_Pr_EmpJobData_T]![dteEndRateDate]=9/9/9999),"
",[dbo_Pr_EmpJobData_T]![dteEndRateDate])

What I am wanting is if the date is 9/9/9999 then show nothing. But if it
is anything other than 9/9/9999 show me the data in the field.

When I run this all the fields show as nothing. help?

If dteEndRateDate is actually a date field, you can do this:

IIf(([dbo_Pr_EmpJobData_T]![dteEndRateDate]=#9/9/9999#),"
",[dbo_Pr_EmpJobData_T]![dteEndRateDate])

Tom Lake
 
J

jjacob

Thanks Rick! Knew it was something simple I overlooked.

Rick Brandt said:
jjacob said:
Function as copied from sql view

IIf(([dbo_Pr_EmpJobData_T]![dteEndRateDate]=9/9/9999),"
",[dbo_Pr_EmpJobData_T]![dteEndRateDate])

What I am wanting is if the date is 9/9/9999 then show nothing. But
if it is anything other than 9/9/9999 show me the data in the field.

When I run this all the fields show as nothing. help?

Dates in Access need to be delimited with #.

IIf(([dbo_Pr_EmpJobData_T]![dteEndRateDate]=#9/9/9999#),"",[dbo_Pr_EmpJobData_T]![dteEndRateDate])
 
Top