I have been trying to develop an application in access. I can read from table but cant run insert statement. Whenever, it executes the insert statement. It throws an error message Run-Time Error 424, object not found. I am sure there is nothing wrong with my code because same piece of code works in another project however in my lastest project it does not work.
Any help or advice would be appreciated.
Private Sub Cmd_Save_Add_Click()
Dim SQL As String
Dim message As String
Dim StrDate As String
StrDate = Day_Date.Value + "/" + Month_Date.Value + "/" + Year_Date.Value
SQL = "INSERT INTO Proj_info(ProjectNumber, ProjectName, CustomerName, [Value], [StartDate], [WorkType])"
SQL = SQL + " VALUES ('" & Project_No & "', '" & Project_Name & "', '" & Customer_Name & "',"
SQL = SQL + "'" & Value & "', '" & Start_Date & "', '" & Combo18 & "');"
Please Note: When it hits DoCmd.RunSQL SQL then it gives the error message "error message Run-Time Error 424, object not found".