Thanks Dave that was exactly what I needed. I think every google search I tried had 'view' in it and that must have been my big problem. I've posted the new code below: Dim db As Database Set db = CurrentDb Dim curSQL As String Dim qrynam As String For Each qrydef In db.QueryDefs qrynam = qrydef.Name curSQL = qrydef.SQL MsgBox "sql name: " & qrynam & Chr$(13) & "sql view: " & curSQL Next