473,382 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Help with filter


I have the following filter in a report:

[MonYer] = 'August 2005' and [RepresentativeTeam] = 'Client Information
Center' And Left(PolicyNumber,1) = 'Z' or 'H'

My intention is to have records returned if in August 2005 with the
Client Information Center as the team and any Z or H policies.

However, the above filter is returning ALL (every month and team) H
policies.

Do I need to rewrite to read:

[MonYer] = 'August 2005' and [RepresentativeTeam] = 'Client Information
Center' And Left(PolicyNumber,1) = 'Z' OR [MonYer] = 'August 2005' and
[RepresentativeTeam] = 'Client Information Center' And
Left(PolicyNumber,1) = 'H'?

I hope not - seems wordy! :)

Nov 13 '05 #1
2 1045
BerkshireGuy wrote:
I have the following filter in a report:

[MonYer] = 'August 2005' and [RepresentativeTeam] = 'Client Information
Center' And Left(PolicyNumber,1) = 'Z' or 'H'

My intention is to have records returned if in August 2005 with the
Client Information Center as the team and any Z or H policies.

However, the above filter is returning ALL (every month and team) H
policies.

Do I need to rewrite to read:

[MonYer] = 'August 2005' and [RepresentativeTeam] = 'Client Information
Center' And Left(PolicyNumber,1) = 'Z' OR [MonYer] = 'August 2005' and
[RepresentativeTeam] = 'Client Information Center' And
Left(PolicyNumber,1) = 'H'?

I hope not - seems wordy! :)
Use () to make a true/false condition. Frankly, I don't see how your
filter even works. What is an Or H?

"[MonYer] = 'August 2005' and " & _
"[RepresentativeTeam] = 'Client Information Center' And " & _
"(Left(PolicyNumber,1) = 'Z' or Left(PolicyNumber,1) = 'H')"

Nov 13 '05 #2
[MonYer] = 'August 2005'
AND [RepresentativeTeam] = 'Client Information
Center'
AND Left(PolicyNumber,1) In ('Z' ,'H');

...maybe...

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Trey | last post by:
I have a DataTable with a integer field called SortOrder. This table is loaded with and XML file. I have this table in a DataView and I set the RowFilter to filter some row, then I change the...
0
by: Suzanne | last post by:
Hello experts, I am a VBA newbie. Most of the tricks I apply to my applications I learn from here or google. I couldn't find a solution for the following two things, they both are related to...
5
by: MGFoster | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've converted an ACC97 .mdb file to an ACC2K2 .adp. A report that worked in ACC97 doesn't work in ACC2K2. Report setup: ACC97 ...
1
by: Jeff Smeker | last post by:
I have, over the past few years, developed a Access system that is in use in our companies engineering, purchasing, and sales departments. It is a fairly complex system that runs great. So, I am...
5
by: Rated R1 | last post by:
I wrote this before in the NGs, so I am going to paste the responses that I got and see if someone can please help me. Email me and we can set something up as Id even be willing to pay for your...
2
by: Midiman69 | last post by:
Hi I am trying to use a unbound combo box on a menu form to open another Form and filter records according to the combo box selection and failing miserably! I am using the following -...
0
by: Patrick | last post by:
I'm working on a contact management application, and need a hand with one aspect... Here's what I want to create: ------------------------------------ A form split into two parts. There is a...
0
by: wtxwtx | last post by:
Hi, I need your help. I have a legend C program that works well after it was compiled under Visial Studio 6. Now a new version of Visial Studio 2005, V8 is installed on my machine. And I...
4
by: Wook | last post by:
Ok I got a set of Forms Reports etc it goes like this Reports Form Passes a Filter to the report for the needed results The filter it passes along is fine except one problem I need a way for the...
9
by: TF | last post by:
Hello all, I made a ASP.NET 2.0 site that shows possible "recipes" for paint colors stored in an access dbase. Basically, 1000 colors are stored with specific RGB values in separate columns. A...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.