S stevecrowhurst Oct 28, 2003 #1 Can anyone tell how I write the code to create a qry from an SQL string that is currently in a MsgBox
Can anyone tell how I write the code to create a qry from an SQL string that is currently in a MsgBox
A Allen Browne Oct 28, 2003 #2 Dim db As DAO.Database Dim qdf As DAO.QueryDef Set db = CurrentDb() Set qdf = db.CreateQueryDef("SomeName4TheQuery") qdf.SQL = "SELECT BookingID, BookingDate FROM tblDaoBooking;" Set qdf = Nothing Set db = Nothing
Dim db As DAO.Database Dim qdf As DAO.QueryDef Set db = CurrentDb() Set qdf = db.CreateQueryDef("SomeName4TheQuery") qdf.SQL = "SELECT BookingID, BookingDate FROM tblDaoBooking;" Set qdf = Nothing Set db = Nothing