I have an ADOTable that contains an ACCESS database of over 3, 000 records. In this database there are 284 records with a field named. ‘Password’ and 430 records with a field named ‘ExpYearMonDay”. I need to count the records containing each of thesr fields. I am using the following code:
Form_Main.ADOTable1.Filter := 'Passwords <> Null';
Form_Main.ADOTable1.Filtered := true;
Passwords := Form_Main.ADOTable1.RecordCount;
TodayStr := FormatDateTime('yyyymmdd',now);
TodaysDte := StrToInt(TodayStr);
Form_Main.ADOTable1.Filter := 'ExpYearMonDay >' + IntToStr(TodaysDte);
Form_Main.ADOTable1.Filtered := true;
Members := Form_Main.ADOTable1.RecordCount;Passwords is an integer value.
I get a result of 525 rather than the correct 284 for the Passworde but I get the CORRECT result for Members.
What is causing the incorrect count for Password?
Form_Main.ADOTable1.Filter := 'Passwords <> Null';
Form_Main.ADOTable1.Filtered := true;
Passwords := Form_Main.ADOTable1.RecordCount;
TodayStr := FormatDateTime('yyyymmdd',now);
TodaysDte := StrToInt(TodayStr);
Form_Main.ADOTable1.Filter := 'ExpYearMonDay >' + IntToStr(TodaysDte);
Form_Main.ADOTable1.Filtered := true;
Members := Form_Main.ADOTable1.RecordCount;Passwords is an integer value.
I get a result of 525 rather than the correct 284 for the Passworde but I get the CORRECT result for Members.
What is causing the incorrect count for Password?