Question
Hello....I am also new to Access...and writing codes. I am currently creating a database where I have subforms. I want to have information flow from the main form to the subform for some fields. Then I want all of this information to flow to a table. So, I have created another table. This is the code I am using. It is not working, please help.
Private Sub Form_Load()
Dim db As DAO.Database
Set db = CurrentDb
CurrentDb.Execute = "INSERT INTO tblUpdateDate ( [Project ID], [Project Name], [Update Date] ) " & _
"SELECT s.[Project ID], s.[Project Name], s.[Update Date] " & _
"FROM tblAssessmentForm AS s WHERE (((s.[Project ID])=[Forms]![frmAssessmentForm]![Project ID]))"
DoCmd.RunSQL (sql)
|