Query Using Buttons To Select A Group

osullipa

Registered User.
Local time
Today, 04:41
Joined
Dec 7, 2004
Messages
31
I have a query which I want to based on a group selected on a form using a selector button. EG if a person is a member of the accounts team that button would be selected. I could then just run the query to get members of the accounts team.

I am using the following SQL, but find when I run it "every" record is selected.
It has got to be something simple - I hope! Can anyone please advise. Many thanks in advance.

Peter


SELECT PEOPLE.TITLE, PEOPLE.FORENAME, PEOPLE.SURNAME, PEOPLE.DEPARTMENT, PEOPLE.ADD0, PEOPLE.ADD1, PEOPLE.ADD2, PEOPLE.ADD3, PEOPLE.ADD4, PEOPLE.POSTCODE
FROM PEOPLE
WHERE [Forms]![GroupSelector]![Selector]=True;
 
If you're selecting the groups using an OptionGroup then the values are usually 1,2,3,4 etc. You then refer to that from the query which should then link back to the Group field in your people table.

Col
 

Users who are viewing this thread

Back
Top Bottom