【发布时间】:2016-08-11 13:47:28
【问题描述】:
如何使用多个索引键,第一个字段相等且大于第二个字段。
例如:
在 MS Access 上
Table: Persons(Name[string], Family_name, Age[Int])
Index: Second_key(Name, Age)
在 VBA 上
DIM Name as string
DIM Age as Integer
DIM Table_1 as Recordset
Name = "Tom"
Age = 20
Set Table_1 = Currentdb.OpenRecorset("Persons")
Table_1.INDEX = "Second_key"
Table_1.SEEK "=", Name, ">", Age
我收到错误“RUN-TIME error '3421' 类型转换错误”
MS Access 允许通过多个键进行搜索,请参阅https://msdn.microsoft.com/en-us/library/bb221096%28v=office.12%29.aspx
请帮帮我。
【问题讨论】:
标签: vba ms-access indexing seek