How to get Null and IS NULL combine (Third Condition/All Data)

Muaz

Registered User.
Local time
Yesterday, 21:02
Joined
Dec 20, 2013
Messages
50
Hi All;

I am using a frame on form to get report. Below is the code used to filter report.

Select Case Me.fraReportType.Value
Case 1
strReportType = "Like '*'"
Case 2
strReportType = " Is Null"
Case 3
strReportType = " Is Not Null"
End Select


The second and Third case is working fine. While the first condition is not working. This filter is on date field.

There are three possibilities:

1. If we need all data
2. If we need is null data
3. If we need is not null data

How I can get the first condition using my code mentioned above.

Any suggestion will be highly appreciated.

Best Regards
Muaz
 
may be as simple as you are missing a space before Like
 
If you need all data, don't apply a filter.

The problem with the first case where you set strReportType is probably that you don't have a space preceding it. The 2 cases that work do.
 
Since the general purpose of a Filter is to Exclude items that do not fit the desired criteria, and the first entry represents all items, It is difficult to see why a filter would be needed. Try using no Filter and see if it does what you want.

Beaten by two! and I even looked before I started to post :banghead:
 

Users who are viewing this thread

Back
Top Bottom