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