【发布时间】:2015-03-17 05:49:53
【问题描述】:
如何在报表访问中设置条件 if else 语句?
这是报告中搜索特定数据的编码.....
Dim lngID As String
lngID = InputBox("Enter RF No")
If lngID = "" Then
DoCmd.ClearMacroError
Else
DoCmd.OpenReport "Requisition_ReportComplete", acViewReport, , "[RF_no]=" & lngID
End If
这是 if else 语句的编码
Dim lngID As String
lngID = InputBox("Enter RF No")
If lngID = "" Then
DoCmd.ClearMacroError
ElseIf lngID <> RF_no Then
MsgBox "Data not exist"
Else
DoCmd.OpenReport "Requisition_ReportComplete", acViewReport, , "[RF_no]=" & lngID
End If
用于搜索的 if else 语句不能满足我的需求..我不知道为什么....
【问题讨论】:
标签: ms-access vba ms-access-2007