merlynsdad
Programmer
I'm taking data from a form and putting it into a table. ID is an autonumber in the table and Description is memo.
The SQL is ok, and varID and strUpdate have the correct values in the watch window. I'm still getting an object variable or block variable not set error.
If the square peg won't fit in the round hole, sand off the corners.
Code:
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strUpdate As String
Dim varID As Variant
Dim strSQL As String
varID = Forms!frmEditTicket!ID
strUpdate = Forms!frmEditTicket!txtUpdate
strSQL = "UPDATE tblMaster " _
& "SET Description = ('" & strUpdate & "') " _
& "WHERE ID = ('" & varID & "');"
debug.print strSQL
db.Execute strSQL
If the square peg won't fit in the round hole, sand off the corners.