In news:(E-Mail Removed),
Douglas J. Steele <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> And just for the sake of completeness, you could also use
>
> Dim intLoop As Integer
> Dim tdf As TableDef
>
> For intLoop = 0 To (CurrentDb.TableDefs.Count - 1)
> Set tdf = CurrentDb.TableDefs(intLoop)
> Debug.Print tdf.Name
> Next intLoop
Do you really want to call CurrentDb inside that loop? How about
:
With CurrentDb
For intLoop = 0 To (.TableDefs.Count - 1)
Set tdf = .TableDefs(intLoop)
Debug.Print tdf.Name
Next intLoop
End With
Or even:
With CurrentDb.TableDefs
For intLoop = 0 To (.Count - 1)
Set tdf = .Item(intLoop)
Debug.Print tdf.Name
Next intLoop
End With
Or:
With CurrentDb.TableDefs
For intLoop = 0 To (.Count - 1)
Debug.Print .Item(intLoop).Name
Next intLoop
End With
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)