macro to remove field and restore original qry
Posted on 2013-12-04
need a macro that will remove the field region from the following vba code
Sub CreateQuery() dim strSQL as string dim qdf as QueryDef strSQL = "SELECT Field1, Field2, Region FROM YourTable WHERE core = '" & me.txtCore & "' ORDER BY [GroupBy]" set qdf = Currentdb.CreateQueryDef("qryMyQuery", strSQL) docmd,OpenQuery "qryMyQuery" end sub
and restore the qry back to its original form..