Hi Dan,
Try this :
Sub GetNames()
Dim i As Integer
For i = 0 To CurrentDb.TableDefs.Count - 1
If CurrentDb.TableDefs(i).Attributes = 0 Then
Debug.Print CurrentDb.TableDefs(i).Name
End If
Next i
For i = 0 To CurrentDb.QueryDefs.Count - 1
If Not Left(CurrentDb.QueryDefs(i).Name, 1) = "~" Then
Debug.Print CurrentDb.QueryDefs(i).Name
End If
Next i
End Sub
This will print Visible table and query names in to immediate window.
I hope it helps.
Regards
Suat