Reputation: 133
I have a form in ms access I want to filter between two dates updated on the click of a button. The field I want to filter is called Date
The dates to be filtered by are entered though a couple of a textboxs in short date format called TxtDtStrt and TxtDtEnd the button is called NCRDateFilter
Using the NCRDateFilter button event procedure 'On Click' and the below code I would expect the form the be filtered by date range between TxtDtStrt and TxtDtEnd values
Private Sub NCRDateFilter_Click()
DoCmd.ApplyFilter "", "[Date] Between [TxtDtStrt] And [TxtDtEnd]", ""
End Sub
But it doesn't use the TxtDtStrt/TxtDtEnd values, instead shows popups asking for the TxtDtStrt and then another for the TxtDtEnd value....
Upvotes: 1
Views: 31