crystal2000a
New member
- Local time
- Yesterday, 23:54
- Joined
- Jul 23, 2012
- Messages
- 3
Hi Experts,
I'm creating a search form to filter out data based on certain inputs. My VBA code looks like:
However, the output does not include records where other fields are blank. I have read that I may need to use Is Null but am not sure how to. Any help would be appreciated!!
I'm creating a search form to filter out data based on certain inputs. My VBA code looks like:
Code:
Private Sub Command18_Click()
On Error GoTo errorcatch
Me.Filter = "([Experiments.Log] Like ""*" & Me.Text21 & "*"") AND ([Expdate] Like ""*" & Me.Text22 & "*"") AND ([BaseSolution] Like ""*" & Me.Text24 & "*"") AND([AddCom] Like ""*" & Me.Text25 & "*"") AND ([Test] Like ""*" & Me.Text26 & "*"") AND ([Plan] Like ""*" & Me.Text23 & "*"")"
Me.FilterOn = True
Exit Sub
errorcatch:
MsgBox "Error #: " & Err.Number & vbCrLf & vbCrLf & Err.Description
End Sub
However, the output does not include records where other fields are blank. I have read that I may need to use Is Null but am not sure how to. Any help would be appreciated!!