访问:运行时错误“2176” - 该属性的设置太长,但不是
我不是一位经验丰富的 VBA 程序员,并且我不喜欢使用 Access。我被要求修复 MS Access 2010 VB 应用程序中的一些错误。
我有以下代码行引发运行时错误“2176” - 此属性的设置太长。
grdDocs.RowSourceType = "SELECT tblLicenceDocuments.lDocumentId, " & _
"tblLicenceDocuments.sTitle as Title, " & _
""""" as Type, " & _
""""" as Method, " & _
"tblLicenceDocuments.sAvailabilityDetails as Availability, " & _
""""" as Format " & _
"FROM tblLicenceDocuments " & _
"WHERE tblLicenceDocuments.lLicenceId = 1187 " & _
"ORDER BY tblLicenceDocuments.sTitle"
有问题的sql长度只有279个字符,所以长度不是问题(我可能是错的)。我已经运行了sql并且它是有效的。我在网上搜索过,没有找到好的线索。
任何建议将不胜感激。
I'm not an experienced vba programmer and working with access is not my cup of tea. I've been asked to fix some errors in an MS Access 2010 VB application.
I have the following line of code which throws run-time error '2176' - The setting for this property is too long.
grdDocs.RowSourceType = "SELECT tblLicenceDocuments.lDocumentId, " & _
"tblLicenceDocuments.sTitle as Title, " & _
""""" as Type, " & _
""""" as Method, " & _
"tblLicenceDocuments.sAvailabilityDetails as Availability, " & _
""""" as Format " & _
"FROM tblLicenceDocuments " & _
"WHERE tblLicenceDocuments.lLicenceId = 1187 " & _
"ORDER BY tblLicenceDocuments.sTitle"
The sql in question is only 279 characters in length, so the length is not a problem (I could be wrong). I have run the sql and it is valid. I have searched the web with no good leads.
Any suggestions will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的意思是设置 .RowSource,而不是 .RowSourceType;正如蒂姆·威廉姆斯尽职尽责地指出的那样。
I meant to set .RowSource, not .RowSourceType; As Tim Williams so dutifully pointed out.