Senin, 03 Oktober 2011

RE: [MS_AccessPros] filter a report with 2 fields

 

Liz-

Just write it out as a WHERE clause:

WHERE ([Hiring Manager Name] = [mgr1]) OR
([SAP Requestor] = [mgr1])

If you're on the query design grid, put [mgr1] under Hiring Manager Name, then
skip DOWN a line (that's the first OR line) and put [mgr1] again under SQP
Requestor.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of liznewhome
Sent: Tuesday, October 04, 2011 3:09 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] filter a report with 2 fields

Greetings!

I have a report that I need to limit. The problem is that I need to limit by
two fields, looking for the same value:

I need all the entries where EITHER:
[Hiring Manager Name]=[mgr1]
OR
[SAP Requestor]=[mgr1]
using the SAME search term for [mgr1](let's say "jagarwal")for each field.

[Hiring Manager Name] has very few entries, and [SAP Requestor] has a lot - they
are mutually exclusive, and every entry has either one or the other.

I've tried this in my query, to no avail:
IIf(([Hiring Manager Name] Is Not Null),([Hiring Manager Name]=[mgr1]),([SAP
Requestor]=[mgr1]))

it just returns everything

Help, please!
Liz

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar