0
我正在根據日期標準來篩選表格。我想我以某種方式消滅日期格式,並且找不到能夠返回結果的組合。子表單上有有效的日期;標準應返回結果 - 但返回零記錄。我嘗試了DATE函數以及明確的#10/17/2017#類型值。MS Access VBA - 使用日期的篩選器表格
Dim strFilter As String
Select Case Me!frmFilter.Value
Case 1 'All
Forms![InventoryList].[InventoryList subform].Form.FilterOn = False
Case 2 'Active
strFilter = "Forms![InventoryList].[InventoryList subform].Form.[StartDate] > #" & Date & "#"
Forms![InventoryList].[InventoryList subform].Form.Filter = strFilter
Forms![InventoryList].[InventoryList subform].Form.FilterOn = True
Case 3 'Pending
'do something else
End Select
End Sub
任何建議可以幫助我將這項任務向前推進一點點?
謝謝!
什麼數據類型是'StartDate'的訪問? – DiskJunky
「StartDate」來自查詢,格式爲「常規日期」。查詢的源表定義爲「日期/時間」。 –