Hello all!
I am a n00b. I am trying to run the following SQL syntax in access 2010 :
Update refApplications Set CertifiedDate = cmbdate.value,approvedBy = cmbApprover.Value,[approvedby(Dataowner)] = cmbDataOwner.Value where name = cmbApplication.Value
where the *.value are fields in a custom form. I am trying to hook up the above to a button to execute the SQL syntax. However, where should I stick this in? I tried over vba with the following however, it could not find the table for some reason.
Private Sub Command20_Click()
Dim strSQL As String
Dim cn As ADODB.Connection
Dim cmd As ADODB.Command
Set cn = CurrentProject.Connection
MsgBox cmbDate.Value
strSQL = "Update refApplications Set CertifiedDate = cmbdate.value,approvedBy = cmbApprover.Value,[approvedby(Dataowner)] = cmbDataOwner.Value where name = cmbApplication.Value"
DoCmd.RunSQL strSQL
End Sub
Please help me out!!!![]()