quick filter sometimes working

sammers101

Registered User.
Local time
Today, 03:14
Joined
May 11, 2012
Messages
89
I have a datasheet that is filtered when you click any of a few buttons

I use browseTo. A few of the buttons will show the quick filter list. The code for the browseTo is all the same except for the where condition field.

The buttons with these codes does not show a drop down list when I try to filter my datasheet even further (only shows text filters):

Button 1's where condition: [statusID]<10 And ([focDate]-6<=Date() Or IsNull([focDate]))

Button 2's where condition: [statusID]<10 And ([shipDate]-6<=Date() Or IsNull([shipDate])) And ([focDate]-6<=Date() Or IsNull([focDate]))

However, the buttons with this code shows the drop down list:
Button 3's where condition: [statusID]<10
 

Attachments

  • example.png
    example.png
    91.2 KB · Views: 91
the drop down does not show if the number of possible entries is too great. Not sure what that number is however - it is less than what excel might display, although that has it's limits as well.
 
I am wondering what BrowseTo has to do with the issue you're having.
 
well browse to with only [statusID]<10 works just fine, when I limit it even more with ([focDate]-6<=Date() Or IsNull([focDate])) it stops showing the list

I think it has something to do with the OR, or maybe the condition is too complex
 
I can replicate the issue. Yes, seems to be related to OR operator.

I have never used BrowseTo. I also don't usually allow users QuickSearch facility. I prefer VBA to build filter criteria. http://allenbrowne.com/ser-62.html

The button 2 expression does not make sense with repeat of date criteria.
 
I can replicate the issue. Yes, seems to be related to OR operator.
I can't seem to replicate it. Here's my setup:
attachment.php

For the first button, I have the following code:
Code:
Private Sub Command0_Click()
DoCmd.BrowseTo acBrowseToForm, "table1", "browseto.child2"

End Sub
And I get the following result:
attachment.php


For the second button, I have the following code:
Code:
Private Sub Command1_Click()
DoCmd.BrowseTo acBrowseToForm, "table1", "browseto.child2", "[email/com]='a' or [email/com]='b'"

End Sub
And I get the following result:
attachment.php


Did I do it right?
 

Attachments

  • setup.PNG
    setup.PNG
    5.7 KB · Views: 123
  • browse1.PNG
    browse1.PNG
    20.8 KB · Views: 139
  • browse2.PNG
    browse2.PNG
    21.9 KB · Views: 146

Users who are viewing this thread

Back
Top Bottom