I keep on getting the error "incorrect syntax near keyword 'where'."
DoCmd.RunSQL "insert into userPreferences (userId, GroupId, preferenceId, properties, isDefault)" & _
"select " + Me.UserId + ", " + Me.GroupId + ", preferenceid, properties, 1 from preferences " & _
" where preferenceId not in " & _
"(select preferenceId from userPreferences where GroupId = " + Me.GroupId + _
" and userId = " + Me.UserId + _
" ) and preferenceid not in " & _
"(select preferenceid from GroupPreferences " & _
"where cabGroupId = " + Me.GroupId + " and override = 0)"