Sub RefreshTables2(Tbl_list As Control, IncludeQueries As Integer, inc_system As
Integer, dd$, TABL As Control) Dim i As Integer, j As Integer, h As Integer Dim st As String Dim OkayToAdd As Integer Dim gcurrentdb As Database Dim ctrCiclo As TableDef Dim prpCiclo As Property Set gcurrentdb = OpenDatabase(dd$, False, False) 'Set GTABLELISTSS = gcurrentdb.li() Tbl_list.Clear 'tbl_list2.Clear 'If IncludeQueries Then ' the ListTables method is used to display querydefs that might ' be present in an Access database, see below for optional code With gcurrentdb ' Enumera l'insieme Containers. For Each ctrCiclo In .TableDefs If ctrCiclo.Attributes = 0 Then Tbl_list.AddItem ctrCiclo.Name ' Me.List2.AddItem "data creazione " & ctrCiclo.DateCreated & " ultima modifica " & ctrCiclo.LastUpdated & " nr record " & ctrCiclo.RecordCount End If Next ctrCiclo .Close End With 'Else ' ' this method uses the tabledefs collection but will not display ' ' querydefs in an Access database ' Tbl_list.Clear ' For i = 0 To gcurrentdb.TableDefs.Count - 1 ' st = gcurrentdb.TableDefs(i).Name ' If (gcurrentdb.TableDefs(i).Attributes And DB_SYSTEMOBJECT) = 0 Then ' If GTABLELISTSS!TABLETYPE = &H1 Then ' Tbl_list.AddItem UCase$(st) ' tbl_list2.AddItem "Tabella creata il " + Format$(GTABLELISTSS!DateCreated, "dd/mm/yy hh.nn") + " Ultima modifica " + Format$(GTABLELISTSS!LastUpdated, "dd/mm/yy hh.nn") ' Else ' Tbl_list.AddItem LCase$(st) ' tbl_list2.AddItem "Query creata il " + Format$(GTABLELISTSS!DateCreated, "dd/mm/yy hh.nn") + " Ultima modifica " + Format$(GTABLELISTSS!LastUpdated, "dd/mm/yy hh.nn") ' End If ' End If ' Next 'End If End Sub |