J
Juan Schwartz
I am simply trying to count records and use returned values in my
report as I do often, but for some reason I can't catch my error here.
======================== Snippet =============================
Set anirs = CurrentDb.OpenRecordset("SELECT COUNT(*) FROM
dbo_CTI_CallHistory WHERE Format(CallDateTime,""m/d/yyyy"") BETWEEN
#2006-04-26# AND #2006-05-02#")
Text0.Value = anirs.RecordCount
ANICount = anirs.RecordCount
======================= End Snippet============================
I've checked the query and it runs returning 179,419. When I try to
assign it to Text0's value, it gives me 1 every time.
I tried this as I've done before with great success on reports...
======================== Snippet =============================
Text0.Value = CurrentDb.OpenRecordset("SELECT COUNT(*) FROM
dbo_CTI_CallHistory WHERE Format(CallDateTime,""m/d/yyyy"") BETWEEN
#2006-04-26# AND #2006-05-02#")
======================= End Snippet============================
I get a type mismatch error there, so something is wrong with how I'm
going about this. Any help would be appreciated.
-Jimmy Kirk
report as I do often, but for some reason I can't catch my error here.
======================== Snippet =============================
Set anirs = CurrentDb.OpenRecordset("SELECT COUNT(*) FROM
dbo_CTI_CallHistory WHERE Format(CallDateTime,""m/d/yyyy"") BETWEEN
#2006-04-26# AND #2006-05-02#")
Text0.Value = anirs.RecordCount
ANICount = anirs.RecordCount
======================= End Snippet============================
I've checked the query and it runs returning 179,419. When I try to
assign it to Text0's value, it gives me 1 every time.
I tried this as I've done before with great success on reports...
======================== Snippet =============================
Text0.Value = CurrentDb.OpenRecordset("SELECT COUNT(*) FROM
dbo_CTI_CallHistory WHERE Format(CallDateTime,""m/d/yyyy"") BETWEEN
#2006-04-26# AND #2006-05-02#")
======================= End Snippet============================
I get a type mismatch error there, so something is wrong with how I'm
going about this. Any help would be appreciated.
-Jimmy Kirk