i have this form to open with an underlying table, i need to filter out the record before it shows but it does not work.
Private Sub Form_Open(Cancel As Integer)
Dim Mystr As String
On Error GoTo Error
Mystr = Left(Format(Now(), "dddd", 3)
If Mystr = "Mon" Then
DoCmd.ApplyFilter , [Days] Like "*2*"
End If
Exit Sub
Error:
MsgBox Err.Description
End Sub
i need to filter out the [Days] field with any number containing "2", but the ApplyFilter does not work, it shows "filtered" on the record navigation but it still show all the records in the table why is that? please help.
Private Sub Form_Open(Cancel As Integer)
Dim Mystr As String
On Error GoTo Error
Mystr = Left(Format(Now(), "dddd", 3)
If Mystr = "Mon" Then
DoCmd.ApplyFilter , [Days] Like "*2*"
End If
Exit Sub
Error:
MsgBox Err.Description
End Sub
i need to filter out the [Days] field with any number containing "2", but the ApplyFilter does not work, it shows "filtered" on the record navigation but it still show all the records in the table why is that? please help.