WHERE Clause with multiple conditions?


i have sql query  needs run depending on 2 criterias no , code.  code works no field. can help  need add version code statement work.  text field

private sub cmdrevise_click()
dim db dao.database
dim strsql string

 

set db = currentdb()

strsql = "delete tbltempmaster"
db.execute strsql, dbfailonerror

strsql = "insert tbltempmaster select * tblmaster [bom no] = '" & me.bom_no & "'"
db.execute strsql, dbfailonerror

docmd.openform "frmbomform"
end sub

i not sure if it's mean, can combine conditions in clause , like

strsql = "insert tbltempmaster select * tblmaster [bom no] = '" & me.bom_no & "' and code = '" & yourcodevar & "'"


olaf helper

blog xing



SQL Server  >  SQL Server Data Access



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........