I figured the quotes maybe weren't correct but when I input #29/07/1991# the DCount operation works fine. When I plop the field in, I get a type mismatch and when I try format the field to either "DD/mm/yyyy" or even when I tried "mm/DD/yyyy" I get the control flow error 6.
#29/07/1991# will work fine as the date is unambiguous
However using #12/07/1991# as 12 July 1991 will be read as 7 Dec 1991 by Access SQL
That's why you need the Format code to ensure its always read correctly
Overflow errors normally occur when a value is too large for a datatype.
For example when using e.g. integer number and the value is over the integer limit of 35000 or so. In such cases, changing to long integer fixes it.
It shouldn't be relevant for date fields
Your BirthDate field SHOULD be Date/Time datatype. If not change it!
Then the code below given by john_g should work without error
Code:
DCount("X", "Customer", "[BirthDate] = #" & Format(DOB, "mm/dd/yyyy") & "#")
If not, remove the input mask from your textbox & set its format property as Short Date