Hi all
I have been trying for weeks with no success. I hope someone on this wonderful forum can help!
Basically I have a form that has 5 checkboxes - BrandDirector, Marketing, Stakeholder, Aftersales and Sales. There are checkbox fields in a table with the same names.
Basically, the user would like to tick the boxes on the form to generate a report with those criteria. For example, a record could have Marketing and Sales ticked, but when the user generates the report they would want for instance everybody who has Marketing ticked. This sounds pretty simple, but I haven't been able to find a way. My current SQL looks like this:
Trouble is that this code also brings up people who aren't ticked to anything, as a result of the criteria I have used.
I know it's probably something in the query criteria, but I can't figure it our!
Help would be greatly appreciated!
Thanks in advance,
Noel.
I have been trying for weeks with no success. I hope someone on this wonderful forum can help!
Basically I have a form that has 5 checkboxes - BrandDirector, Marketing, Stakeholder, Aftersales and Sales. There are checkbox fields in a table with the same names.
Basically, the user would like to tick the boxes on the form to generate a report with those criteria. For example, a record could have Marketing and Sales ticked, but when the user generates the report they would want for instance everybody who has Marketing ticked. This sounds pretty simple, but I haven't been able to find a way. My current SQL looks like this:
Code:
SELECT qryMainFormQuery.CurrentExStaff, qryMainFormQuery.BrandDirector, qryMainFormQuery.Marketing, qryMainFormQuery.Stakeholders, qryMainFormQuery.Aftersales, qryMainFormQuery.Sales
FROM qryMainFormQuery
WHERE (((qryMainFormQuery.CurrentExStaff)="Current") AND ((qryMainFormQuery.BrandDirector)=[Forms]![frmSelectInvitees]![BrandDirector])) OR (((qryMainFormQuery.CurrentExStaff)="Current") AND ((qryMainFormQuery.Marketing)=[Forms]![frmSelectInvitees]![Marketing])) OR (((qryMainFormQuery.CurrentExStaff)="Current") AND ((qryMainFormQuery.Stakeholders)=[Forms]![frmSelectInvitees]![Stakeholders])) OR (((qryMainFormQuery.CurrentExStaff)="Current") AND ((qryMainFormQuery.Aftersales)=[Forms]![frmSelectInvitees]![Aftersales])) OR (((qryMainFormQuery.CurrentExStaff)="Current") AND ((qryMainFormQuery.Sales)=[Forms]![frmSelectInvitees]![Sales]));
Trouble is that this code also brings up people who aren't ticked to anything, as a result of the criteria I have used.
I know it's probably something in the query criteria, but I can't figure it our!
Help would be greatly appreciated!
Thanks in advance,
Noel.