xaviermobius
Registered User.
- Local time
- Today, 21:29
- Joined
- Jul 25, 2006
- Messages
- 12
I have a simple DB with 3 tables and wish to count the number of tables using VBA code.
Code as follows:
The msgbox is returning a value of 9!? If i add another table the value will increment by 1. Why is a value of 9 returned by the dbs.TableDefs.Count command when i only have 3 tables?
Any ideas....
Code as follows:
Code:
Private Sub Command0_Click()
Dim dbs As DAO.Database
Dim tdf As DAO.TableDef
Set dbs = CurrentDb
Dim tablecount As Integer
tablecount = dbs.TableDefs.Count
MsgBox tablecount
End Sub
The msgbox is returning a value of 9!? If i add another table the value will increment by 1. Why is a value of 9 returned by the dbs.TableDefs.Count command when i only have 3 tables?
Any ideas....