G
Guest
I'm not well-versed in Access "coding" and really only know what little I've been able to pick up and comprehend from this newsgroup. So the answer to my problem may be simple, but I just can't figure it out. Any help would be greatly appreciated
I have a Main Form (Form1) with a Subform (Subform1). I'm trying to filter the Subform with a Command Button. The purpose of the filter is exclude all records with a "v" in the [N/A] field in SubForm1
The following code does succeed in excluding all the "v" records, but for some reason that I can't figure out, it also excludes records where the [N/A] field is blank
Private Sub Command18_Click(
With Forms!Form1.[Subform1].For
.Filter = "[N/A] <>""v""
.FilterOn = Tru
End Wit
End Su
What I want this Command Button to do is give me all records where the [N/A] field contains any value other than "v" or is blank. I modified the Command code as follows but now I get "Runtime Error '13', Type Mismatch"
Private Sub Command18_Click(
With Forms!Form1.[frm Main].For
.Filter = "[N/A] <>""v""" Or "[N/A] Is Null
.FilterOn = Tru
End Wit
End Su
I've tried every possible syntax alternative I could think of, with and without quotation marks, and nothing works. What's wrong with my code
Many thanks
Pau
I have a Main Form (Form1) with a Subform (Subform1). I'm trying to filter the Subform with a Command Button. The purpose of the filter is exclude all records with a "v" in the [N/A] field in SubForm1
The following code does succeed in excluding all the "v" records, but for some reason that I can't figure out, it also excludes records where the [N/A] field is blank
Private Sub Command18_Click(
With Forms!Form1.[Subform1].For
.Filter = "[N/A] <>""v""
.FilterOn = Tru
End Wit
End Su
What I want this Command Button to do is give me all records where the [N/A] field contains any value other than "v" or is blank. I modified the Command code as follows but now I get "Runtime Error '13', Type Mismatch"
Private Sub Command18_Click(
With Forms!Form1.[frm Main].For
.Filter = "[N/A] <>""v""" Or "[N/A] Is Null
.FilterOn = Tru
End Wit
End Su
I've tried every possible syntax alternative I could think of, with and without quotation marks, and nothing works. What's wrong with my code
Many thanks
Pau