Docmd.RunSQL
I tried running the code below and it did not work. Can someone help?
Function SaveRecords()
Dim strSQL As String
Dim db As Database
Set db = CurrentDb()
'bind the data from the form to the table
strSQL = "INSERT INTO tblAuditTracker(Date,Datetime,Employer_Name, Case_Status, CO_SME_Name"
strSQL = strSQL & "Case_Number,Reason_Audit,Specific_Reason_Deni al, Reason_Denial,CO_SME_Recommendation,"
strSQL = strSQL & "Action_Taken_by_CO_SME, Analyst, Analyst_Recommendation,SOP_Followed,Comments)"
strSQL = strSQL & "VALUES ('Me.txtDate','Me.txtDatetime','Me.txtEmp','Me.txt Status','Me.comboSME'"
strSQL = strSQL & "'Me.comboCaseNum','Me.comboAuditReason','Me.Combo 131','Me.Combo133','Me.comboReview','Me.comboActio n',"
strSQL = strSQL & "'Me.comboAnalyst','Me.comboRecom','Me.check135',' Me.Text23');"
DoCmd.RunSQL strSQL
End Function
|