blackice
02-05-2006, 03:58 PM
this is my table called "bottom
BottomKey BDate
1 03/02/06 9:42:22 pm
2 03/02/06 9:42:33 pm
3 03/02/06 9:43:31 pm
8 03/02/06 10:23:46 pm
10 04/02/06 9:44:51 am
11 05/02/06 12:09:39 pm
12 05/02/06 12:09:49 pm
13 05/02/06 3:53:52 pm
this is what im doing in VBA:
dim xdate as variant
xdate = Forms![ProductionReport]![StartDate]
Me.BottomGood = DCount("[bottomkey]", "bottom", "[bdate] < #" & xdate & "#")
the date setup in not in US its South Amrica style (dd/mm/yy hh:mm:ss am/pm).
In another form [stardate] is 04/02/06 . And I always get a resoult of "8". I need it tell me the correct answer witch in this case should be "4".
What am i doing wrong? Can some please help. :dunno
BottomKey BDate
1 03/02/06 9:42:22 pm
2 03/02/06 9:42:33 pm
3 03/02/06 9:43:31 pm
8 03/02/06 10:23:46 pm
10 04/02/06 9:44:51 am
11 05/02/06 12:09:39 pm
12 05/02/06 12:09:49 pm
13 05/02/06 3:53:52 pm
this is what im doing in VBA:
dim xdate as variant
xdate = Forms![ProductionReport]![StartDate]
Me.BottomGood = DCount("[bottomkey]", "bottom", "[bdate] < #" & xdate & "#")
the date setup in not in US its South Amrica style (dd/mm/yy hh:mm:ss am/pm).
In another form [stardate] is 04/02/06 . And I always get a resoult of "8". I need it tell me the correct answer witch in this case should be "4".
What am i doing wrong? Can some please help. :dunno