I don't see why you think this would work
Code:
Private Sub txtTotalCasesToDate_GotFocus()
Dim strSQL As String
strSQL = "SELECT Count(CaseNum) As CaseCount FROM tblCase "
'strSQL = Nz(DCount("CaseNum", "tblCase"), 0)
Me![txtTotalCasesToDate].ControlSource = strSQL
'Me![txtTotalCasesToDate].Requery
End Sub
All you are doing is assigning a string (of sql code) to your textbox
To run sql you need to execute it e.g.
Code:
dim rst as dao.recordset
set rst=currentdb.execute "SELECT Count(CaseNum) As CaseCount FROM tblCase "
if not rst.eof then Me![txtTotalCasesToDate]=rst!CaseCount
set rst=nothing
rst.close
not tested but if you changed your textbox to a listbox (one row high) you could use
Me![lstTotalCasesToDate].RowSource = "SELECT Count(CaseNum) As CaseCount FROM tblCase "