W
Walter
When this query tries to run it generates an "object required" error at the
Set strSQL. I'm unable to see any difference from others I've found in
searches. What am I missing?
Dim db As DAO.Database
Dim strSql As String
Dim varLO, varLL, varLS, varLTD, varTID As Variant
Set varLO = MyControl1
Set varLL = MyControl2
Set varLS = MyControl3
Set varLTD = MyControl4
Set varTID = MyControl5
Set strSql = "UPDATE tblMyTable " _
& "SET MyField1 = varLO, " _
& "MyField2 = varLL " _
& "MyField3 = varLS " _
& "MyField4 = varLTD " & _
"WHERE ((MyField5)= varTID));"
Set db = DBEngine(0)(0)
db.Execute strSql, dbFailOnError
Set strSQL. I'm unable to see any difference from others I've found in
searches. What am I missing?
Dim db As DAO.Database
Dim strSql As String
Dim varLO, varLL, varLS, varLTD, varTID As Variant
Set varLO = MyControl1
Set varLL = MyControl2
Set varLS = MyControl3
Set varLTD = MyControl4
Set varTID = MyControl5
Set strSql = "UPDATE tblMyTable " _
& "SET MyField1 = varLO, " _
& "MyField2 = varLL " _
& "MyField3 = varLS " _
& "MyField4 = varLTD " & _
"WHERE ((MyField5)= varTID));"
Set db = DBEngine(0)(0)
db.Execute strSql, dbFailOnError