我遇到了以下问题,并收到运行时错误3134
LastOrderNumber = DMax("Order", "Model_types")
NewOrderNumber = CLng(LastOrderNumber + 1)
CurrentDb.Execute "INSERT INTO Model_types (Order) " _
& "VALUES (" & NewOrderNumber & ")"
Model_types中的“Order”字段是Long Integer。
任何帮助将不胜感激。
答案 0 :(得分:2)
订单是保留字。您应该将您的陈述更改为:
CurrentDb.Execute "INSERT INTO Model_types ([Order]) " _
& "VALUES (" & NewOrderNumber & ")"