Can anyone tell me why this code does not work properly? Here it is in it's simplest format. My table contains about 4,000 records, however the textbox on the form always displays a count of 1.
TIA Maq![[americanflag] [americanflag] [americanflag]](/data/assets/smilies/americanflag.gif)
<insert witty signature here>
Code:
Dim strSQL As String
Dim dbs As Database
Dim rs As Recordset
strSQL = "SELECT * from table1"
Set dbs = CurrentDb()
Set rs = dbs.OpenRecordset(strSQL)
Me!TotalClaims = rs.RecordCount
Set rs = Nothing
Set dbs = Nothing
TIA Maq
![[americanflag] [americanflag] [americanflag]](/data/assets/smilies/americanflag.gif)
<insert witty signature here>