Actually the following code was working excellent and meet my criteria.
CurrentDb.QueryDefs("Query2").SQL = "SELECT " & strList & " from Store_t where " & GetCriteria()
DoCmd.OpenQuery "Query2", acViewPreview, acReadOnly
But this query opens behind all the forms.So that i cannot see it.I want it to be focused when it is openend,Infront of user.How I can set focus on Query2.
Please help me in this regard.
CurrentDb.QueryDefs("Query2").SQL = "SELECT " & strList & " from Store_t where " & GetCriteria()
DoCmd.OpenQuery "Query2", acViewPreview, acReadOnly
But this query opens behind all the forms.So that i cannot see it.I want it to be focused when it is openend,Infront of user.How I can set focus on Query2.
Please help me in this regard.