J
JudyB
Hi! I have a table with a lot of true/false fields to say which groups each
person is in (for example, the field "Group6" is true for people in that
group). I link to that table from a number of databases (one for each
group). I have a table in each little database with variables for that group
(GROUPINFOTABLE) - including the name of the true/false field for that group
(example fieldname = ThisGroupName; value = "Group6")
I know I can make make an expression
IIf([BIG_TABLE].[Group6]=True,"Member","NonMember")
and if I set the criteria for that field as "Member" I'll get the members of
Group6.
What I want to do is something along the lines of
IIF([BIG_TABLE]. & [ & value of GROUPINFOTABLE.ThisGroupName & ]
=True,"Member","NonMember")
and use that to get the members of the group.
That way if I make a copy of the database for a new group, I just have to
change the group name in one place, and all queries that use that name will
show the new group.
(I suspect if that was all I was doing, there'd be a better way - but I also
need to know who is in both group5 (defined as group6-1) and group6 and who's
in 6 but not 5 and so on - all of which I can do easily enough - if I can
find a way to use text I enter or calculate to provide the name of the field
in the big table that I want to use in my query.)
I do hope you can at least understand what I'm asking - and it would be
really great if you have an answer other than "it's impossible"! Thanks!
I have Access 2003.
person is in (for example, the field "Group6" is true for people in that
group). I link to that table from a number of databases (one for each
group). I have a table in each little database with variables for that group
(GROUPINFOTABLE) - including the name of the true/false field for that group
(example fieldname = ThisGroupName; value = "Group6")
I know I can make make an expression
IIf([BIG_TABLE].[Group6]=True,"Member","NonMember")
and if I set the criteria for that field as "Member" I'll get the members of
Group6.
What I want to do is something along the lines of
IIF([BIG_TABLE]. & [ & value of GROUPINFOTABLE.ThisGroupName & ]
=True,"Member","NonMember")
and use that to get the members of the group.
That way if I make a copy of the database for a new group, I just have to
change the group name in one place, and all queries that use that name will
show the new group.
(I suspect if that was all I was doing, there'd be a better way - but I also
need to know who is in both group5 (defined as group6-1) and group6 and who's
in 6 but not 5 and so on - all of which I can do easily enough - if I can
find a way to use text I enter or calculate to provide the name of the field
in the big table that I want to use in my query.)
I do hope you can at least understand what I'm asking - and it would be
really great if you have an answer other than "it's impossible"! Thanks!
I have Access 2003.