MS Access的SQL查询中的语法错误

时间:2015-02-05 20:43:10

标签: database ms-access

我正在制作表格以在表格中插入记录。我无法运行此查询,因为它向我显示语法错误。我尝试了很多,但无法找到错误。我的查询如下。

CurrentDb.Execute "
  INSERT into Database2Sample(
      nyu_id, location1, location2, 
      first_name, middle_name, last_name, 
      full_name, instructor_sis_id, instructor_email, 
      intstructor_net_id, personal_email, CV_link, 
      employee_nyu_global_site, highest_degree, degree_subject_area, 
      degree_status, degree_granting_institution, accomplishments, 
      Other_employee, WSQ_home_campus, teaching_language_course) 
  VALUES 
    ('" & Me.nyu_id & "', '" 
        & Me.location1 & "', '" 
        & Me.location2 & "', '"
        & Me.first_name & "', '" 
        & Me.middle_name & "', '" 
        & Me.last_name & "', '" 
        & Me.full_name & "', '" 
        & Me.instructor_sis_id & "', '" 
        & Me.instructor_email & "', '" 
        & Me.intstructor_net_id & "', '" 
        & Me.personal_email & "', '" 
        & Me.CV_link & "', '" 
        & Me.employee_nyu_global_site & "', '" 
        & Me.highest_degree & "', '" 
        & Me.degree_subject_area & "', '" 
        & Me.degree_status & "', '" 
        & Me.degree_granting_institution & "', '" 
        & Me.accomplishments & "', , '" 
        & Me.Other_employee & "', '" 
        & Me.WSQ_home_campus & "', '" 
        & Me.teaching_language_course & "')"

Error text

1 个答案:

答案 0 :(得分:2)

您在成就与员工字段之间有两个逗号。

'" & Me.accomplishments & "', , '" & Me.Other_employee & "'

删除其中任何一个都会使其正常工作。