Need report to only select the "yes" based on month

H

Hedwig14

I have a table that shows the company name, start date, id number and a check
box (yes/no) fields. My report currently allows me to select the month I
want to report on but I need for it to only select those records in that
month that have a check mark (yes) in the field. I hope you understand what
I am trying to say. Thanks in advance
 
J

Jeff Boyce

If you base your report on a query, in that query you can indicate that you
only want records with a check mark (yes) by adding "Yes" to the selection
criterion under that field (in the query).

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John Spencer

How are you currently selecting the Month? Are you modifying a query,
applying a filter, or using a parameter in a query?

You need to filter the check box based on whether it is checked (True or
-1) or unchecked (False or 0).

If you care to share what you are doing then someone can help you
further with how to expand that technique. Also, please tell us the
name of the check box field.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
H

Hedwig14

I changed my query to include the Yes/No field and ran the query and got the
results I needed and then I included that field on my report to ensure that
it was only picking up the "yes" companies and it did so I took that field
back out of the report as it is needless to see a column with the word "yes"
for every company. Thank you for all your help!
 
J

John... Visio MVP

Stevie, can you actually read?

The OP is asking about adding an extra restriction to the query that defines
the report. There was no indication that there was anything wrong with the
table.

To the OP: You are able to select records based on month, so your report
should be based on a query. Can you post the query so we can show you how to
modify it to include a restriction based on the check mark field.

John... Visio MVP
 
H

Hedwig14

My report is based on a query and my table does have a CompanyName as well as
CompanyID...I just didn't mention all the fields in my table as I figured it
was not relevant to the question that I needed to be answered. I'm not sure
if you still need me to post the query since I have the results that I need.
Let me know.
 
J

John... Visio MVP

So you were able to add the extra condition to your report?

Steve is our local troll who ignores the questions asked and tries to
convince posters that they need his help (for a reasonable fee). If you had
responded, he would have found some way of indicating that your tables
needed rework and he was the only one who can do it.

John... Visio MVP
 
J

John... Visio MVP

Give it up steve, you are just digging your own hole deeper.

So how much will you charge to redesign his "tabls"?

John... Visio MVP
 
P

Philip Herlihy

Steve said:
Once again you got a response from the IGNORANT stalker! He flaunts that he
is an MVP but notice it is not in Access. Look at your thread and you will
see he provided no help in trying to solve your problem. Ignore the ignorant
SOB.

Many times in problems posted to the newsgroup, the underlying problem is
misdesign of tables. A poster will ask how to do something and most ti,es an
answer can be found. However the misdesign of the tables still persists and
sooner or later another problem will arise. At his point the misdesign of
the tables becomes obvious and a redesign ensues. The redesign then makes a
redo of the solution to the first question necessary.

If you post your relevant tables in the form of:
TblCompany
CompanyID
CompanyName

with a little explanation of your database, I will be glad to give you an
evaluation of the design of your tabls.

Steve
(e-mail address removed)


John is a respected professional with what amounts to an award from
Microsoft. Steve evidently isn't, and has given some very questionable
advice here.

John offers his advice without asking for payment. Steve is constantly
touting for paid work, to the great annoyance of the volunteers here.

So, do you want an expert's advice, for free, or do you want Steve's
offer? Your choice.

Phil, London
 
J

Jeff Boyce

Easier to just ask for clarification than presume you know...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
H

Hedwig14

I agree Jeff and I would sooner have all the information to avoid problems
later as these companies are constantly being updated and such. So here goes:
Report is based on qryCompanies which is based on Companies as my table.

Table = Field Names of CompanyID (Autonumber - Primary Key), CompanyName
(Text), BusinessDate (Date/Time), BusinessNumber (Text as we use letters and
numbers as identifiers or file numbers), Owned (Yes/No).

QryCompanies = Fields are Companies.* and CompanyName (descending) using the
Table Companies.

On my form the label (Owned) has the Checkbox so this is the one that I
would like for the report to only show if it is checked as we are only
interested in those companies that are owned.

I hope this will help clear things up and guide the correct answer.
 
H

Hedwig14

Just to expand as well, I use an opening form called frmReportMonthDue which
uses a combo box to select the month with a value list and row source of
"January"; "February"; etc. Once you select the month based on the
BusinessDate it opens the Report (rptCompanyList). This is the report that I
need to have it filter to only list those owned companies that have the
checkbox.
 
H

Hedwig14

Can someone answer my question as to why the checkbox is not editable when I
add the Owned field into the query and report?
 
J

John Spencer MVP

Did you add the checkbox to the form?
Is the checkbox bound to any field? It should not be bound to any field or to
any calculation.

Check that the control's Locked property is NO and Enabled property is Yes.

What do you want to happen if the checkbox is not checked? Do you want all
the records or just records where the the value of the field is false?

If you have set the checkbox up to be a triple-state checkbox then it can be
checked (true), unchecked (false), or grayed out (Null)?

If you use a triple-state checkbox on your criteria form, the criteria in the
query would be something like the following to show just the owned or just the
not owned or ALL the records. Triple-State property is found on the Data tab.

Field: Owned
Criteria: Forms![frmReportDue]![NameofCheckboxControl] or
Forms![frmReportDue]![NameofCheckboxControl] is null

You might try opening a new thread with just the problem you are having.
That, hopefully will get you away from all the extraneous comments that are
attached to this thread.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
H

Hedwig14

I didn't have the checkbox set to be triple-state...once I did that and
selected the proper control source on the form everything worked out nicely!
I didn't want to start a new thread as this seems to have been the final
answer. Thank you and to all that assisted and it sure is nice to see you
pounce out those preditors that try to take advantage of others like me when
we are vulnerable! Cheers

John Spencer MVP said:
Did you add the checkbox to the form?
Is the checkbox bound to any field? It should not be bound to any field or to
any calculation.

Check that the control's Locked property is NO and Enabled property is Yes.

What do you want to happen if the checkbox is not checked? Do you want all
the records or just records where the the value of the field is false?

If you have set the checkbox up to be a triple-state checkbox then it can be
checked (true), unchecked (false), or grayed out (Null)?

If you use a triple-state checkbox on your criteria form, the criteria in the
query would be something like the following to show just the owned or just the
not owned or ALL the records. Triple-State property is found on the Data tab.

Field: Owned
Criteria: Forms![frmReportDue]![NameofCheckboxControl] or
Forms![frmReportDue]![NameofCheckboxControl] is null

You might try opening a new thread with just the problem you are having.
That, hopefully will get you away from all the extraneous comments that are
attached to this thread.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Can someone answer my question as to why the checkbox is not editable when I
add the Owned field into the query and report?
 
J

John... Visio MVP

I'm glad you worked it out.

John.. Visio MVP
Hedwig14 said:
I didn't have the checkbox set to be triple-state...once I did that and
selected the proper control source on the form everything worked out
nicely!
I didn't want to start a new thread as this seems to have been the final
answer. Thank you and to all that assisted and it sure is nice to see you
pounce out those preditors that try to take advantage of others like me
when
we are vulnerable! Cheers

John Spencer MVP said:
Did you add the checkbox to the form?
Is the checkbox bound to any field? It should not be bound to any field
or to
any calculation.

Check that the control's Locked property is NO and Enabled property is
Yes.

What do you want to happen if the checkbox is not checked? Do you want
all
the records or just records where the the value of the field is false?

If you have set the checkbox up to be a triple-state checkbox then it can
be
checked (true), unchecked (false), or grayed out (Null)?

If you use a triple-state checkbox on your criteria form, the criteria in
the
query would be something like the following to show just the owned or
just the
not owned or ALL the records. Triple-State property is found on the
Data tab.

Field: Owned
Criteria: Forms![frmReportDue]![NameofCheckboxControl] or
Forms![frmReportDue]![NameofCheckboxControl] is null

You might try opening a new thread with just the problem you are having.
That, hopefully will get you away from all the extraneous comments that
are
attached to this thread.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Can someone answer my question as to why the checkbox is not editable
when I
add the Owned field into the query and report?

:

in
message Once again you got a response from the IGNORANT stalker!
Yes, and that stalker is YOU.
 
K

Keith Wilby

Hedwig14 said:
I didn't have the checkbox set to be triple-state...once I did that and
selected the proper control source on the form everything worked out
nicely!
I didn't want to start a new thread as this seems to have been the final
answer. Thank you and to all that assisted and it sure is nice to see you
pounce out those preditors that try to take advantage of others like me
when
we are vulnerable! Cheers

I hope the "noise" doesn't put you off posting again, there are some very
knowledgeable and helpful people here who won't ask you for money.

Keith.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top