query criteria not working

atrium

Registered User.
Local time
Today, 14:55
Joined
May 13, 2014
Messages
348
I have a client file that has a BranchCode (Numeric)
I have an open login form for the operator and when they log in their BranchCode they are related to is placed in a variable.

I only want to display client records related to a branch code 7 if the operator belongs to Branch 7

Otherwise I want all other client records shown from all branches except 7

My selection criteria in my query for Client Branch Code is
Code:
IIF([Forms]![LoginFrm]![pintBranchId] = 7, 7, <> 7)
[

When the operator pintBranchId = 7 I get no records selected

When the operator pintBranchId <> 7 I get no records selected

If I just put in 7 I get all the client records for branch 7, If I don't put anything in I get all records


The Client file field is also numeric

I'm sure there is some simple thing that I'm missing

Any help would be appreciated
 
Last edited:
Sorry anyone who spent time on this. I have worked out that I was using the wrong fields.

Regards
 

Users who are viewing this thread

Back
Top Bottom