Isskint
Slowly Developing
- Local time
- Today, 13:42
- Joined
- Apr 25, 2012
- Messages
- 1,302
Hi All,
So i have 2 tables: Invoice List and Case List. The fields of interest are;
[Invoice List].[Customer] - Short text
[Invoice List].[Invoice Date] - date-time
[Case List].[Customer] - short text
[Case List].[Created On] - date time
I have a query that returns records in [Case List] where [Invoice List] has a matching [Customer] and an [Invoice Date] > [Created On]. my criteria is
I make it return a boolean value.
However there are several instances where the criteria is not finding valid matches.
For example, i have a case record of CustomerA who has a [Created On] date of 10/03/2016 00:00. I have a subsequent invoice record for CustomerA on 19/04/2016 12:29.
If i manually filter [Invoice List] i get this record, but the query does not. I have tried amending the criteria to use DateSerial() to ensure we are not getting a mixup on month and day (10/03 is 10th March) but it still does not return this record.
Am i missing something obvious?
So i have 2 tables: Invoice List and Case List. The fields of interest are;
[Invoice List].[Customer] - Short text
[Invoice List].[Invoice Date] - date-time
[Case List].[Customer] - short text
[Case List].[Created On] - date time
I have a query that returns records in [Case List] where [Invoice List] has a matching [Customer] and an [Invoice Date] > [Created On]. my criteria is
Code:
DCount("[ID]","[Invoice List]","[Customer]='" & [Customer] & "' AND [Invoice Date] >#" & [Created On] & "#")<>0
However there are several instances where the criteria is not finding valid matches.
For example, i have a case record of CustomerA who has a [Created On] date of 10/03/2016 00:00. I have a subsequent invoice record for CustomerA on 19/04/2016 12:29.
If i manually filter [Invoice List] i get this record, but the query does not. I have tried amending the criteria to use DateSerial() to ensure we are not getting a mixup on month and day (10/03 is 10th March) but it still does not return this record.
Am i missing something obvious?