I wrote a simple code to check for three values of three different fields in a form and find a record in a table if they match - I did it by using the findfirst method and checking for three criterias connected with "And".
So for example if fieldA = x, fieldB = y and fieldC = w,
open tableA and find a record where these three fields are equal to other three fields.
It works great the probelm is one of the fields is a date field and behaves really strange...
When the date is something like 12/11/2015 it works fine but once it's 11/11/2015 or 10,09,08,07/11/2015 it doesn't find it and thinks it doesn't exist.
I though it had something to do with zeros but I can't be certain since it happened with 11 as well.
I tried the code without comparing the date field and it's fine.
Something messes with the way access interperts the date..I've tried using Format, CDate but it didn't change anything.. always certain dates are being ignored..
Any clue as to what might cause this?
The code itself is very simple just one line of findfirst..
Btw I tried displaying what date it finds when the code doesn't work and it always gets stuck on one record with something like 08/09/2014...
Thanks in advance
So for example if fieldA = x, fieldB = y and fieldC = w,
open tableA and find a record where these three fields are equal to other three fields.
It works great the probelm is one of the fields is a date field and behaves really strange...
When the date is something like 12/11/2015 it works fine but once it's 11/11/2015 or 10,09,08,07/11/2015 it doesn't find it and thinks it doesn't exist.
I though it had something to do with zeros but I can't be certain since it happened with 11 as well.
I tried the code without comparing the date field and it's fine.
Something messes with the way access interperts the date..I've tried using Format, CDate but it didn't change anything.. always certain dates are being ignored..
Any clue as to what might cause this?
The code itself is very simple just one line of findfirst..
Btw I tried displaying what date it finds when the code doesn't work and it always gets stuck on one record with something like 08/09/2014...
Thanks in advance