binding - How to bind a form to an SQL statement in microsoft access -
**edit
hello tryng include sql statement in vba can sort through data , filter. have found way include sql in vba error says "the runsql action requires sql statement" sql statement within strsql variable.
private sub buttonnot_click() dim strsql string strsql = "select table1.[firstnam], table1.[lastnam]" & _ "from table1 " & _ "where ((([firstnam]) <> 'jamie') , (([lastnam]) <> 'cartman'));" docmd.runsql strsql me.filter = "" me.filter = "firstnam<>'jamie' , lastnam<>'cartman'" end sub
me.recordsource = {sql string}
make sure turn filter on after appending query string.
Comments
Post a Comment