Hi All,
I am unable to find out how to run a select query in VBA.
I am building a select query based on the input given by the users through Text boxes on the Form(at run time).
Then assigning it to a string variable, say strSQL.
When the user fills in the Text boxes and clicks a button, I need to execute the query and retrieve the records at run time.
By using "DoCmd.OpenQuery", I could run only a saved query.
And using "DoCmd.RunSQL", its possible only to update/delete records and not to select.
Could anyone plz help me with this.
Thanks in advance.
I am unable to find out how to run a select query in VBA.
I am building a select query based on the input given by the users through Text boxes on the Form(at run time).
Then assigning it to a string variable, say strSQL.
When the user fills in the Text boxes and clicks a button, I need to execute the query and retrieve the records at run time.
By using "DoCmd.OpenQuery", I could run only a saved query.
And using "DoCmd.RunSQL", its possible only to update/delete records and not to select.
Could anyone plz help me with this.
Thanks in advance.