concatenation and max length of string in VBA, access

后端 未结 2 1910
南笙
南笙 2021-01-16 14:54

I\'ve had severas problems with strings in access-vba.

The thing is, access (sometimes) limit the string\'s length to about 255 characters.

However, dependin

2条回答
  •  情书的邮戳
    2021-01-16 15:22

    When concatenating strings for SQL, add a vbCrLf character when lines might grow long. Access seems to have trouble ingesting VBA strings (to execute as SQL) greater than about 1000 characters. e.g.

    strSQL = strSQL & "SELECT some fields " & vbcrlf & "FROM some table "
    

提交回复
热议问题