Hi All,
I trying to run a query using command button on my main form, but it seems i have an error in writing this code. I want to save the two values from my sub forms, and a value supplied by user from my main form.
Private Sub Command351_Click()
Dim strSQL As String
'build the string including the field names as required
strSQL = "INSERT INTO tab_Summary (cs_datefrom, in_int_ext, in_ext_caller)"
VALUES ("Me.[text295]",
"Me.[Smdr Qry_Total_Direct subform1].Form![text2]",
"Me.[Smdr Qry_Total_Queue subform].Form![text2]")"
'execute the SQL string to insert the values
DoCmd.RunSQL strSQL
End Sub
Please if you an idea, what's wrong with this script, im asking your help guys.
Thanks and more power.
I trying to run a query using command button on my main form, but it seems i have an error in writing this code. I want to save the two values from my sub forms, and a value supplied by user from my main form.
Private Sub Command351_Click()
Dim strSQL As String
'build the string including the field names as required
strSQL = "INSERT INTO tab_Summary (cs_datefrom, in_int_ext, in_ext_caller)"
VALUES ("Me.[text295]",
"Me.[Smdr Qry_Total_Direct subform1].Form![text2]",
"Me.[Smdr Qry_Total_Queue subform].Form![text2]")"
'execute the SQL string to insert the values
DoCmd.RunSQL strSQL
End Sub
Please if you an idea, what's wrong with this script, im asking your help guys.
Thanks and more power.