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
Post a Comment