I am attempting to create the following SQL INSERT INTO statement, but I am getting a Syntax Error. Any suggestions?:
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 & ")"
Table AptRent has the following data types:
BuildingRentID: AutoNumber
BuildingID: Number (Me.cbSelectBuildingForRental)
RentAmountID: Number (Me.cbCreateRentalRentAmount)
InitialRentDueDate: Date/Time (Me.tbCreateRentalRDD)
TenantID: Number (Me.cbSelectTenantForRental)
AptNoID: Text (Me.cbSelectAptNoforRental)
MoveInDate: Date/Time (Me.tbCreateRentalMID)
MoveOutDate: Date/Time (Me.tbCreateRentalMOD)
DateAdded: Date/Time (Now())
SecurityAmount: Currency (Me.tbSecurityAmnt)
SecurityPaid: Yes/No (Me.ckSecurityPd)
NoDaysLate: Number (Me.tbNoDaysLate)
LateAmount: Currency (Me.tbLatePmnt)