为什么INSERT INTO在下面的字符串中添加前导和尾随空格:
CurrentDb.Execute "INSERT INTO [Rounds] ([Round ID],[Cource ID],[Round Date],[Tee Time],[Handicap Round],[Player ID],[Player HCP],[Slope],[Tee],[Holes Played],[Comments],[Green Fee],[GF Term])" & _
" VALUES (' " & TempVars!tvNewRoundID & " ',' " & TempVars!tvCourceID & " ',' " & TempVars!tvRoundDate & " ',' " & TempVars!tvTeeTime & " ',' " & TempVars!tvHandicapRound & " ',' " & TempVars!tvPlayerID & " ',' " & [Forms]![Data Entry Form]![txtPlayerHCP] & " ',' " & TempVars!tvPlayerSlope & " ',' " & TempVars!tvTeeName & " ',' " & TempVars!tvHolesPlayed & " ',' " & TempVars!tvComments & " ',' " & TempVars!tvGreenFee & " ',' " & TempVars!tvGreenFeeTerm & " ' );"
声明如下: 将tvNewRoundID公开为TempVars 将公共tvRoundDate用作TempVars 公开tvTeeName作为变体等
该问题仅适用于字符串,其他所有都可以正常工作。我尝试在INSERT INTO之前进行修剪但无济于事,在表中显示空格。