I have a piece of VBA code in which I have a SQL insert statement with a problem. I think there is a relatively simple syntax error that I can't seem to find and am hoping that somebody might be able to take a look at it and point it out for me. Here's what I have:
Thank you for looking and for any suggestions that you might be able to make on my behalf.
Austin Moran
Code:
sql = "insert into dbo_tbl_Call (Member_Number,CallDate,Question,Answer,StartTime,StopTime,CallDurationMinutes,Commission,CommissionBetweenBrokers,CommissionBetweenBrokersandAgents,CommissionBetweenBrokersandSellerBuyers,CommissionRipoff,RebateNegotiationOfCommission,CommissionOther,LicenseLaw,LicenseLawAdvertising,LicenseLawOwnership,LicenseLawChangingBrokers,LicenseLawExclusiveListing,LicenseLawContinuingEducation,LicenseLawLLC,HowTo_LicenseLaw,PersonalAssistant,LicenseLawOther,FairHousing,FairHousingDiscrimination,FairHousingOther,Contract,ListingAgreement,ContractBinder,ContractPurchaseOffer,ContractMultipleCompetingOffers,ContractDepositsEscrow,ContractOther,Disclosure,DisclosureBrokerStatusAgency,DisclosurePropertyCondition,DisclosureSexOffender, _
DisclosureLeadPaint,DisclosureOther,Agnecy,BrokersAgency,SellersAgent,BuyersAgent,ChangingAgency,AgencyOther,DOS,ChangingBrokers,ComplaintForViolation,DOSother,Referrals,NonLicensees,Licensees,OutOfStateBrokers,ReferralsOther,Arbitration,ArbitrationArbitrableIssue,ArbitrationCurrentlyInArbitration,ArbitrationArbitrationCompletedAppeal,ArbitrationCompliance,ArbitrationOther,CodeOfEthics,CCodeOfEthicsViolation,CodeOfEthicsProcess,CodeOfEthicsDecision,CodeOfEthicsAppeal,CodeOfEthicsOther,BoardAssociation,MembershipIssue,ElectionIssue,ReferralAgent,BoardAssociationOther,MLS,MLSVOW,MLSIDX,MLSPolicy,MLSother,OtherHotlineIssue,DoNotCall,DoNotFax,CANSPAM,RESPA,MortgageBroker,IndependentContractor,AntiTrust,Other) " & _
"values " & _
"(" & Me.Member_Number & ",#" & Me.CallDate & "#,'" & Replace(Me.Question, "'", "''") & "','" & Replace(Me.Answer, "'", "''") & "',#" & Me. _
StartTime & "#,#" & Me.EndTime & "#," & CallDurationMinutes & _
"," & Commission & "," & CommissionBetweenBrokers & "," & CommissionBetweenBrokersandAgents & "," & CommissionBetweenBrokersandSellerBuyers & "," & CommissionRipoff & "," & RebateNegotiationOfCommission & "," & CommissionsOther & "," & LicenseLaw & "," & LicenseLawAdvertising & "," & LicenseLawOwnership & "," & LicenseLawChangingBrokers & "," & LicenseLawExclusiveListing & "," & LicenseLawContinuingEducation & "," & LicenseLawLLC & "," & _
HowTo_LicenseLaw & "," & PersonalAssistant & "," & LicenseLawOther & "," & FairHousing & "," & FairHousingDiscrimination & "," & FairHousingOther & "," & Contract & "," & ListingAgreement & "," & ContractBinder & "," & ContractPurchaseOffer & "," & ContractMultipleCompetingOffers & "," & ContractDepositsEscrow & "," & ContractOther & "," & Disclosure & "," & DisclosureBrokerStatusAgency & "," & DisclosurePropertyCondition & "," & DisclosureSexOffender & "," & _
DisclosureLeadPaint & "," & DisclosureOther & "," & Agency & "," & BrokersAgency & "," & SellersAgent & "," & BuyersAgent & "," & ChangingAgency & "," & AgencyOther & "," & DOS & "," & ChangingBrokers & "," & ComplaintForViolation & "," & DOSother & "," & Referrals & "," & NonLicensees & "," & Licensees & "," & OutOfStateBrokers & "," & ReferralsOther & "," & _
Arbitration & "," & ArbitrationArbitrableIssue & "," & ArbitrationCurrentlyInArbitration & "," & ArbitrationArbitrationCompletedAppeal & "," & ArbitrationCompliance & "," & ArbitrationOther & "," & CodeOfEthics & "," & CodeOfEthicsViolation & "," & CodeOfEthicsProcess & "," & CodeOfEthicsDecision & "," & _
CodeOfEthicsAppeal & "," & CodeOfEthicsOther & "," & BoardAssociation & "," & MembershipIssue & "," & ElectionIssue & "," & ReferralAgent & "," & BoardAssociationOther & "," & MLS & "," & MLSVOW & "," & MLSIDX & "," & MLSPolicy & "," & MLSOther & "," & OtherHotlineIssue & "," & DoNotCall & "," & DoNotFax & "," & CANSPAM & "," & RESPA & "," & MortgageBroker & "," & IndependentContractor & "," & AntiTrust & "," & Other & ")"
Thank you for looking and for any suggestions that you might be able to make on my behalf.
Austin Moran