Hi guys,
I'm building a query, but can't quite get the coding to work.
I have 3 items I've selected for this query:
ContractDeliveryDate
AmmendedContractDeliveryDate
CompletionDate
I'm trying to make a query that display any orders that are within 7 WORKING days of today's date, but with a few considerations.
If the "CompletionDate" has a date in it, then that column should not be included in the report.
If the "AmmendedContractDeliveryDate" is blank, then it compares the date of "ContractDeliveryDate" and the date in working days time.
If "AmmendedContractDeliveryDate" has a date in it, then it compares THAT instead of "ContractDeliveryDate".
This is what I've got so far:
Any help? I'll be exporting this to Excel, but will worry about that later!
Thanks
[/FONT]
I'm building a query, but can't quite get the coding to work.
I have 3 items I've selected for this query:
ContractDeliveryDate
AmmendedContractDeliveryDate
CompletionDate
I'm trying to make a query that display any orders that are within 7 WORKING days of today's date, but with a few considerations.
If the "CompletionDate" has a date in it, then that column should not be included in the report.
If the "AmmendedContractDeliveryDate" is blank, then it compares the date of "ContractDeliveryDate" and the date in working days time.
If "AmmendedContractDeliveryDate" has a date in it, then it compares THAT instead of "ContractDeliveryDate".
This is what I've got so far:
Code:
[/FONT][/I][/FONT]
[FONT=Calibri][I][FONT=Verdana]iif(isnull([CompletionDate]) = False Then [/FONT][/I][/FONT]
[FONT=Calibri][I][FONT=Calibri][FONT=Verdana]iif(isnull([AmmendedContractDeliveryDate]) = True Then[/FONT][/FONT][/I][/FONT]
[FONT=Calibri][I][FONT=Calibri][FONT=Verdana]Between AmmendedContractDeliveryDate() And DateAdd("d",7,Date()) [/FONT][/FONT][/I][/FONT]
[FONT=Calibri][I][FONT=Calibri][FONT=Verdana]Else[/FONT][/FONT][/I][/FONT]
[FONT=Calibri][FONT=Calibri][FONT=Calibri][FONT=Calibri][FONT=Verdana][I]iif(isnull([AmmendedContractDeliveryDate]) = False Then[/I][/FONT][/FONT][/FONT]
[FONT=Calibri][FONT=Calibri][/FONT][/FONT][FONT=Verdana][I]ContractDeliveryDate() And DateAdd("d",7,Date()) [/I][/FONT]
[FONT=Verdana][I]
Any help? I'll be exporting this to Excel, but will worry about that later!
Thanks
[/FONT]