just trying to provide an area where I can display the number of records from
a table in the DB....
Don't use any VBA code AT ALL then; instead set the Control Source of Text3
(or rename the control to txtRecordCount if you want to preserve your sanity
when you revisit this database in six months) to
=DCount("*", "Deposits")
If you want the number of deposits on a particular date, you'll need to add a
third parameter to the DCount - just putting in DateDep won't work, because
the third argument needs to be a valid SQL WHERE clause. For today's date you
could use
=DCount("*", "Deposits", "[DateDep] = #" & Date() & "#")
but it's not clear what records you want to count!