I would like access an external database and get a count of the tables and display the number of tables in a text box on a form. Like this...
Total Pets in Pets Database: 4 <-- (in textbox)
I have a code that I am trying to use but it is not working. It displays the name of the tables and the count of each record in the table. The ugly part is that it also captures the Access SYS Tables too.
The SYS tables throw off my count. How do it hide it from the count?
All I want is a total count of the tables created by people and NOT all the hidden SYS tables or names or number of records.
Dim tdf As TableDef
SourceFile = "C:\Pets\Pets.mdb"
Dim dbPETSdb As DAO.Database
Set dbPETSdb = DBEngine.Workspaces(0).Databases(0)
Set dbPETSdb = OpenDatabase(SourceFile)
For Each tdf In dbPETSdb.TableDefs
MsgBox tdf.Name & "-" & tdf.RecordCount //This is my problem area.
editbox1 = tdf.count ?????
Beware when using the ListIndex and the Column() properties of a listbox in Access 2007. A bug has been identified in the Access 2007 listbox code which can cause the .ListIndex property to return a -1, and the .Columns(#) property to return a NULL…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data.
A Microsoft Access subform is used to show relevant calcul…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other.
As you build tables in Microsoft Ac…