开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜