Sub exaPropertyandMethod() Dim dbLib As Database Dim qdfExpensive As QueryDef Set dbLib = CurrentDb() Debug.Print dbLib.Name Set qdfExpensive = dbLib.CreateQueryDef("Expensive", "SELECT * FROM BOOKS WHERE Price > 20") End Sub