Senin, 03 Oktober 2011

RE: [MS_AccessPros] filter a report with 2 fields

Why not use:
WHERE [Hiring Manager Name]=[mgr1] OR [SAP Requestor]=[mgr1]

BTW: I don't believe in ever using parameter prompts in queries. IMO, only use controls on forms.

Duane Hookom
MS Access MVP

To: MS_Access_Professionals@yahoogroups.com
From: no_reply@yahoogroups.com
Date: Tue, 4 Oct 2011 01:09:15 +0000
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


[Non-text portions of this message have been removed]

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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Tidak ada komentar:

Posting Komentar