Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NO: DoCmd.RunSQL ("SELECT ...")
- YES: strSQL = "SELECT ..."
- DoCmd.RunSQL (strSQL)
- Debug.Print strSQL
- Stop
- strSQL = "SELECT wazzle FROM bamsploot" [underscore]
- & vbCrLf & "WHERE 1 > 2"
- VBA > QBE (described above) > Notepad (for global replace)
- Notepad > QBE (for checking, troubleshooting) > VBA
- Dim myQuery as string, _
- rsADO as ADODB.recorset
- rsADO = new ADODB.recordset
- myQuery = getSQLQuery(myId_Query)
- 'if my query retunrs a recordset'
- set rsADO = myADOConnection.Execute myQuery
- 'or, if no recordset is to be returned'
- myADOConnection.Execute myQuery
- set rsADO = myADOConnection.execute "dbo.myViewName"
Add Comment
Please, Sign In to add comment