HomeGrowth
Technical User
I have a update button to update a record in the subform. the codes are as follow:
Dim cnn As ADODB.Connection
Dim sSQL As String
Set cnn = CurrentProject.Connection
Dim strDocNumber As String
strDocNumber = [Forms]![frm(6-1)SOPEntryForm]![txtDocNumber]
sSQL = "UPDATE [tbl(6)AllDocuments] SET [tbl(6)AllDocuments].Status = ""S"" " & _
"WHERE [tbl(6)AllDocuments].Status Like ""C"" AND " & _
"[tbl(6)AllDocuments].[Doc Number] " & _
"Like """ & strDocNumber & """;"
cnn.Execute sSQL 'Update the record
I got error message: 'Could not update; currently update'
Can't figure out why, any body can shed some lights!!
Dim cnn As ADODB.Connection
Dim sSQL As String
Set cnn = CurrentProject.Connection
Dim strDocNumber As String
strDocNumber = [Forms]![frm(6-1)SOPEntryForm]![txtDocNumber]
sSQL = "UPDATE [tbl(6)AllDocuments] SET [tbl(6)AllDocuments].Status = ""S"" " & _
"WHERE [tbl(6)AllDocuments].Status Like ""C"" AND " & _
"[tbl(6)AllDocuments].[Doc Number] " & _
"Like """ & strDocNumber & """;"
cnn.Execute sSQL 'Update the record
I got error message: 'Could not update; currently update'
Can't figure out why, any body can shed some lights!!