If vb is comparing the 6 and the 21 then it is comparing strings.

For dates you can use the DateDiff function

try this in your form
VB Code:
  1. date1 = 21/10/2002
  2. date2 = 06/11/2002
  3. Debug.Print  DateDiff("d",date1,date2)