我正在尝试创建以下 SQL INSERT INTO 语句,但出现语法错误。有什么建议么?:
SQL = "
INSERT INTO AptRent
(BuildingID,
RentAmountID,
InitialRentDueDate,
TenantID,
AptNoID,
MoveInDate,
MoveOutDate,
DateAdded,
SecurityAmount,
SecurityPaid,
NoDaysLate,
LateAmount)
VALUES
(" & Me.cbSelectBuildingForRental & ","
& Me.cbCreateRentalRentAmount & ","
& Me.tbCreateRentalRDD & ","
& Me.cbSelectTenantForRental & ", '"
& Me.cbSelectAptNoforRental & "' ,"
& Me.tbCreateRentalMID & ","
& Me.tbCreateRentalMOD & ","
& Now() & ","
& Me.tbSecurityAmnt & ","
& Me.ckSecurityPd & ","
& Me.tbNoDaysLate & ","
& Me.tbLatePmnt & ")"
表AptRent具有以下数据类型:
BuildingRentID:自动编号
BuildingID:编号(Me.cbSelectBuildingForRental)
RentAmountID : 数字 ( Me.cbCreateRentalRentAmount )
InitialRentDueDate:日期/时间(Me.tbCreateRentalRDD)
租户ID:编号 ( Me.cbSelectTenantForRental )
AptNoID:文本(Me.cbSelectAptNoforRental)
MoveInDate:日期/时间(Me.tbCreateRentalMID)
MoveOutDate:日期/时间(Me.tbCreateRentalMOD)
添加日期:日期/时间(现在())
SecurityAmount : 货币 ( Me.tbSecurityAmnt )
SecurityPaid:是/否(Me.ckSecurityPd)
NoDaysLate : 数字 ( Me.tbNoDaysLate )
LateAmount:货币(Me.tbLatePmnt)