Sorry guys...I need your help again.
I have a list box containing several hundred records. The second column (column(1) assuming columns start at 0) contains a log date.
I want the user to be able to filter the list box for a specified log date range without having to open a different form. The only way I can see to do this is reopen the current form using a criteria. The code below is my attempt to do this but I can't get the search criteria to work. Any ideas or suggestions as to how I might get this working? Maybe I'm going about this all wrong?
Private Sub Command21_Click()
Dim stdocname As String
Dim stlinkcriteria As String
stdocname = "FRM - Fund errors (Full errors list)"
stlinkcriteria = Me![List0].Column(1) "Between #" & [Startdate]& "# and #" & [Finishdate]& "#"
DoCmd.OpenForm stdocname, acNormal, , stlinkcriteria
End Sub
Thanks,
Dave
I have a list box containing several hundred records. The second column (column(1) assuming columns start at 0) contains a log date.
I want the user to be able to filter the list box for a specified log date range without having to open a different form. The only way I can see to do this is reopen the current form using a criteria. The code below is my attempt to do this but I can't get the search criteria to work. Any ideas or suggestions as to how I might get this working? Maybe I'm going about this all wrong?
Private Sub Command21_Click()
Dim stdocname As String
Dim stlinkcriteria As String
stdocname = "FRM - Fund errors (Full errors list)"
stlinkcriteria = Me![List0].Column(1) "Between #" & [Startdate]& "# and #" & [Finishdate]& "#"
DoCmd.OpenForm stdocname, acNormal, , stlinkcriteria
End Sub
Thanks,
Dave