# Access Expression/formula question

#### gheyman

##### Well-known Member
Whats wrong with this formula? it will not let me enter it. But I am not seeing where the problem is.

Submitted_Late: IIf([[PDIR Completed] Is Null,"",IIf([PDIR Completed] > [PDIR Due Date] ,DateSerial(Year([PDIR Submission Date]),Month([PDIR Due Date])+1,1)-1),"")

I am checking first to see if I have a date in the PDIR Completed field. If I do then I want to see if that date is greater than the date in the PDIR Due Date Field. If it is, then I want to do a "Eomonth" formula to enter the PDIR Due Date

### Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

#### Joe4

For one thing, you have double square brackets:
Submitted_Late: IIf([[...

#### gheyman

##### Well-known Member
Submitted_Late: IIf([PDIR Completed] Is Null,"",IIf([PDIR Completed] > [PDIR Due Date] ,DateSerial(Year([PDIR Submission Date]),Month([PDIR Due Date])+1,1)-1,""))

Thanks Joe4

#### Joe4

So, did that solve the issue, or is there still other problems with the formula?

Replies
1
Views
784
Replies
6
Views
1K
Replies
8
Views
1K
Replies
3
Views
695
Replies
2
Views
455

1,109,380
Messages
5,528,357
Members
409,817
Latest member
JiNXX9500

### This Week's Hot Topics

• Change military grades into rank
Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
• VBA COUNTIF SOLUTION
Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
• INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...