That's the thing...below is the code behind the " OR " and the " AND "preview report buttons. Both buttons show the BuildWhere value as this:
(tblbestservice.bs_pooratt = True) AND (tblbestservice.bs_mislead = True) AND (tblbestservice.bs_lackinfo = True) AND...
This is the what the immediate window is showing:
SELECT tblcomplaints.ComplaintID, tblbestservice.acctno, tblbestservice.bs_pooratt, tblbestservice.bs_mislead, tblbestservice.bs_lackinfo, tblbestservice.bs_pooretiquette, tblbestservice.bs_ackcust, tblbestservice.bs_lackassistance...
Tek-tips site seems to be having some problems today so I was only recently able to get back on.
I did what you advised but that didn't work either.
What I had to do was recreate the form and that seems to have rectified the problem. Not sure what was wrong with the form.
One thing I'm noticing...
Tags are as follows:
Where=tblbestservice.bs_pooratt,Boolean,=,True;
Where=tblbestservice.bs_mislead,Boolean,=,True;
Where=tblbestservice.bs_lackinfo,Boolean,=,True;
Where=tblbestservice.pooretiquette,Boolean,=,True;
Where=tblbestservice.bs_ackcust,Boolean,=,True...
Ok Fancy Prairie
It worked once! When I changed the Where statement of the checkbox it ran the report perfectly!!!
Then I decided to enter the Tag field for the rest of the checkboxes on the form and that's when I ran into problems.
When I try to execute the report now I'm getting this error...
:( No Luck
This is the SQL view of my statement
SELECT tblcomplaints.ComplaintID, tblcomplaints.CustID, tblcomplaints.ProdCode, tblcomplaints.AcctNo, tblcomplaints.ActionTaken, tblcomplaints.DateResolved, tblcomplaints.Update, tblcomplaints.Cost, tblbestservice.bs_pooratt
FROM tblcomplaints...
I changed the "OR" to " OR " and it does generate the report without any prompts or other errors :)
Thing is though, the report contains more info that I specified on the form. Maybe I created the report wrong??
This is my tag statement for the checkbox...
I think the bottom of your FAQ got truncated, so I copied the remainder from this thread.
If I use DoCmd.OpenReport "rptcomplaints", acViewPreview, , BuildWhere(Me) to run the report it prompts for the value of the checkbox I have selected. If I type in true it then displays the report but it...
I replaced the code like you advised. Different compile error this time: "Sub or Function not defined" at the BuildWhere_ControlType(frm,ctl)function call in the Create Where Clause for current control section.
When I click on the button I'm getting this error: "Compile Error. Can't find project or library" and it's highlighting the first Left$ in the Build Range part of the function.
If I change the code to Msg BuildWhere (Me, "OR") I get the same error.
Here's what I have done so far...
I created a general query which shows everything. Then I made the Tag of the checkbox on the form:
Where=[tblbestservice].[chkbs_pooratt],CheckBox,=,True;
How do I go about running the report? Are there any changes to be made in the module?
This module seems to be just what I'm looking for....i'm just not sure how to use it.
I want to use a form with multiple checkboxes to filter the results of a report. My database is for a Customer Service Department and each complaint logged has one or more reasons/category of complaint attached...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.