Dim txt As String = e.Form.DropDownBox.Text
Dim tbl As Table = Tables("样品筛选_Table1")
If txt = "" Then
tbl.Filter = ""
Else
txt = "'%" & txt & "%'"
tbl.Filter = "名称 Like " & txt
End If
tbl.Sort = "项目,小类,名称,批号,入库日期 Desc"
e.Form.DropDownBox.Select()
'#DropdownClosed()
If e.Selected Then '如果选择了值
Dim tbl As Table = Tables("样品筛选_Table1")
If tbl.Current IsNot Nothing Then
e.Form.DropDownBox.Value = tbl.Current("名称")
Tables("实验记录_Table3").Current("厂家") = tbl.Current("厂家")
Tables("实验记录_Table3").Current("批号") = tbl.Current("批号")
Tables("实验记录_Table3").Current("规格") = tbl.Current("规格")
If e.Form.DropTable IsNot Nothing Then '如果是通过表下拉的
e.Form.DropTable.FinishEditing()
Else '如果是通过窗口下拉的
e.Form.DropDownBox.WriteValue()
End If
End If
End If