I would like to build an append query which takes a value selected in a list box (lstSSCItaly) and joins it to the field 'Team' in table 'tblTeams'. Upon doing so, I would like the query to link the two (the control and the table) and insert the value in the field 'team' in the table 'tblTeams' into the field 'Group' in table 'tblDependencies'. At present, I am getting a run time error 3134 'syntax error with INSERT INTO. My query is as follows:
Private Sub lstSSCItaly_DblClick(Cancel As Integer)
Dim sql_GET As String
sql_GET = "INSERT INTO tblDependencies01(group) SELECT team FROM tblteams WHERE '" & lstSSCItaly & "' = team"
Application.DoCmd.RunSQL (sql_GET)
End Sub