Well, just for instance, you could do this:
Enter this code in a module, not form window.. to do this, just go to the Database Window (F11 in Access), select "Modules" group, and create a new module - if you don't already have one created. Once in the VBA Window, enter this code:
Code:
Private Sub ListQueryNames()
Dim qryDef as DAO.QueryDef
Dim db as DAO.Database
Set db = CurrentDb
For Each qryDef in db.QueryDefs
Debug.Print qryDef.Name
Next
Set qryDef = Nothing
Set db = Nothing
qryDef.Close
db.Close
End Sub
If you just copy and paste this code to your VBA module window, it should work. In order to see what prints out with debug.print, just hit
[ctrl] + G. That will show the "Immediate" window which shows debug.print values at the bottom of the VBA window..
See if that gets you going.
Stephen
![[infinity] [infinity] [infinity]](/data/assets/smilies/infinity.gif)
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV