开发者

Access: run-time error '2176' - The setting for this property is too long, but it is not

开发者 https://www.devze.com 2023-04-13 02:33 出处:网络
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'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, " & _
                           开发者_如何学C     "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.


I meant to set .RowSource, not .RowSourceType; As Tim Williams so dutifully pointed out.

0

精彩评论

暂无评论...
验证码 换一张
取 消