vb6我得到编译错误:方法或数据成员未定义请给我解决方案

时间:2013-11-23 19:49:11

标签: vb6

Private Sub InitNSD()
    'For Vendor
    With nsdUnit
        .ClearColumn
        .AddColumn "Unit ID", 1794.89
        .AddColumn "Unit", 2264.88
        .Connection = CN.ConnectionString

        '.sqlFields = "VendorID, Company, Location"
        .sqlFields = "UnitID, Unit"
        .sqlTables = "Unit"
        .sqlSortOrder = "Unit ASC"

        .BoundField = "UnitID"
        .PageBy = 25
        .DisplayCol = 2

        .setDropWindowSize 7000, 4000
        .TextReadOnly = True
        .SetDropDownTitle = "Units Record"
    End With

End Sub

1 个答案:

答案 0 :(得分:1)

我最好的猜测是你使用的是在nsdUnit中实际没有定义的成员,或者你拼错了这个名字。例如,ClearColumn实际上是方法名称,还是ClearColumns?另一个可疑的位是.SetDropDownTitle = "Units Record"SetDropDownTitle是属性(如赋值运算符所暗示的语法)还是方法?