The easiest way is to create an Access query in design view, then select View > SQL View. You can then modify the SQL statement, or cut and paste it into the Visual Basic Editor if you want to use it there.
Here is an example of using VBA to write SQL: [tt]
strTableOrderGTYP = "tblExample"
strSQL = "SELECT q0.* FROM " + strTableOrderGTYP + " AS q0 ORDER BY q0.NDX;"
Yes but I was assuming that, like a form or whatever, you can do VIEW->Code and go straight to the form's VBA code. With SQL it seems like I have to hunt around for the query's VBA code in the editor.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.