I want to use a field value in the "where clause" of a query. The field I want to drop the value in to is of type "yes/no". The records contain several of these data types. One example I have used is as follows
select * from people where "gp".
(gp is the field in the record and of type "yes/no". This works ok.
What I want however is to use a value from a form to replace the "where condition" eg
SELECT * FROM PEOPLE
WHERE Forms!MailMergeList!ComboGroupSel;
where the "Forms!MailMergeList!ComboGroupSel" returns the "gp" or what ever value I have selected.
This works but returns every record in the database. Can anyone please tell me how to correct this - it is driving me nuts!!!!
Thanks in advance. Regards Peter
select * from people where "gp".
(gp is the field in the record and of type "yes/no". This works ok.
What I want however is to use a value from a form to replace the "where condition" eg
SELECT * FROM PEOPLE
WHERE Forms!MailMergeList!ComboGroupSel;
where the "Forms!MailMergeList!ComboGroupSel" returns the "gp" or what ever value I have selected.
This works but returns every record in the database. Can anyone please tell me how to correct this - it is driving me nuts!!!!
Thanks in advance. Regards Peter