RE: using the results of a function for Criteria
From: Martin J (anonmous_at_nospam.com)
Date: 12/16/04
- Next message: Duane Hookom: "Re: Crosstab Macro"
- Previous message: JL: "RE: running sum query"
- In reply to: John Soarz: "using the results of a function for Criteria"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 16 Dec 2004 14:25:01 -0800
This question has been answered many times. In query builder when you put in
'red' and 'green' for criteria it writes in sql veiw as "WHERE
(([table].[color]='red') and ([table].[color]='green'))" however when you use
a function it will look like "WHERE (([table].[color]='red or green'))" That
is why it doesn't work. You need to use where clause of the docmd.open report
or build the where clause in code.
HTH
Martin J
"John Soarz" wrote:
> Hello all,
> First off this is a great newsgroup, so keep up the good work.
>
> I am trying to have the criteria from multiple queries run a function that
> will limit the amount of information each current user has access to. I am
> able to do this if the user only have permission to one particular area, but
> when 1 user has access to muliple areas I run into problems.
>
> For example:
> The areas would be RED, GREEN, BLUE, ORANGE, YELLOW
>
> USER1 has been assigned to RED
> USER2 has been assigned to BLUE and GREEN
> USER3 has been assigned to RED, ORANGE and Yellow
>
> So what I get the function to do is group all areas together for the current
> user.
>
> For instance say it was USER2 that was logged in the "FINDAREA" function
> would retrieve the following "'BLUE' or 'GREEN'" as a string.
> Within the query I would put the following "Like FindArea()".
> This works for any user that is only assigned to 1 Area, but for users that
> more then 1 it does not work.
>
> Any help with this problem would be greatly appreciated.
>
> Thanks
- Next message: Duane Hookom: "Re: Crosstab Macro"
- Previous message: JL: "RE: running sum query"
- In reply to: John Soarz: "using the results of a function for Criteria"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|