Hi,
I don't consider this to be the most efficient method but you could try.
In the load event of the form that contains the text box put in the following code:
Private Sub Form_Load()
Dim db as DAO.Database
Dim rs as DAO.Recordset
Dim tdfs as DAO.TableDefs
Dim tdf as DAO.TableDef
Dim total as long
total = 0
Set db = CurrentDb
Set tdfs = db.TableDefs
For Each tdf In tdfs
Set rs = db.OpenRecordset(tdf.Name, dbOpenDynaset)
If rs.RecordCount > 0 Then
rs.MoveLast
rs.MoveFirst
total = total + rs.RecordCount
End If
rs.Close
Next tdf
Me.Text1 = total
End Sub
The problem with this code is that it will return the record count of tables in the database including the MSysObjects and so. So if you wnat to have only the records in the tables that you created counted, then you must hard code each table name into the system.
With regards,
PGK