dFirst()函数
时 间:2020-03-21 07:49:54
作 者:souelove ID:7327 城市:郑州
摘 要:dFirst()
正 文:
' *************************** ' Typical Use ' Numerical values. Replace "number" with the number to use. variable = DFirst("[FieldName]", "TableName", "[Criteria] = number") ' Strings. ' Numerical values. Replace "string" with the string to use. variable = DFirst("[FieldName]", "TableName", "[Criteria]= 'string'") ' Dates. Replace "date" with the string to use. variable = DFirst("[FieldName]", "TableName", "[Criteria]= #date#") ' *************************** ' *************************** ' Referring to a control on a form ' Numerical values variable = DFirst("[FieldName]", "TableName", "[Criteria] = " & Forms!FormName!ControlName) ' Strings variable = DFirst("[FieldName]", "TableName", "[Criteria] = '" & Forms!FormName!ControlName & "'") ' Dates variable = DFirst("[FieldName]", "TableName", "[Criteria] = #" & Forms!FormName!ControlName & "#") ' *************************** ' *************************** ' Combinations ' Multiple types of criteria variable = DFirst("[FieldName]", "TableName", "[Criteria1] = " & Forms![FormName]![Control1] _ & " AND [Criteria2] = '" & Forms![FormName]![Control2] & "'" _ & " AND [Criteria3] =#" & Forms![FormName]![Control3] & "#") ' Use two fields from a single record. variable = DFirst("[LastName] & ', ' & [FirstName]", "tblPeople", "[PrimaryKey] = 7") ' Expressions variable = DFirst("[Field1] + [Field2]", "tableName", "[PrimaryKey] = 7") ' Control Structures variable = DFirst("IIf([LastName] Like 'Smith', 'True', 'False')", "tableName", "[PrimaryKey] = 7") ' ***************************
Access软件网QQ交流群 (群号:54525238) Access源码网店
常见问答:
技术分类:
源码示例
- 【源码QQ群号19834647...(12.17)
- 【Access高效办公】统计当...(06.30)
- 【Access高效办公】用复选...(06.24)
- 根据变化的日期来自动编号的示例...(06.20)
- 【Access高效办公】按日期...(06.12)
- 合并列数据到一个文本框的示例;...(05.06)
- 通过命令按钮让Access列表...(04.24)
- 【Access高效办公】统计当...(03.11)
- 【Access Inputbo...(03.03)
- 按回车键后光标移动到下一条记录...(02.12)

学习心得
最新文章
- 64位操作系统引用DAO出现加载D...(08.26)
- Access设置试用期截止日期默认...(08.15)
- Access快速开发平台--Err...(08.12)
- Deepseek资料整理神器(08.11)
- 【Access财务分析示例】按月统...(08.08)
- Access查询里使用Date()...(08.05)
- 关于Access交叉表查询生成的统...(08.02)
- ACCESS做的工作日常小工具_纸...(07.30)
- Access快速开发平台进销存教程...(07.28)
- 关于Access快速开发平台2.6...(07.23)