ms access: Enter parameter value -
i trying open form on click of button. below code
private sub command17_click() dim stuff string dim salarystatus string stuff = "senior stuff" salarystatus = "deposit" ssql = "select customert.* customert (((customert.[salary status])=" & salarystatus & ") , ((customert.[stuff type])= " & stuff & "));" docmd.openform "clusterf" forms!clusterf.form.recordsource = ssql forms!clusterf.form.requery forms!clusterf.form.refresh end sub
when click on button small popup window says enter parameter value stuff , salarystatus
. why window shows. wrong sql query , how fix it?
yes, reduce little , rename button:
private sub command17_click() dim stuff string dim salarystatus string stuff = "senior stuff" salarystatus = "deposit" ssql = "select customert.* customert customert.[salary status] = '" & salarystatus & "' , customert.[stuff type] = '" & stuff & "';" docmd.openform "clusterf" forms!clusterf.recordsource = ssql end sub
Comments
Post a Comment