Access report - based on selected checkboxes. (1 Viewer)

GregMc

New member
Local time
Today, 09:22
Joined
Feb 21, 2021
Messages
6
I have created a shopping list of which the main form contains "Item" and an associated Checkbox for each item. Simply then, I can tick the items I need from the shop then my trouble commences. I don't want to print the complete list - only those items that have the checkbox ticked.

I have a query that sorts the shopping list by "required" but do not know how to have the report print showing only the "required" items.

Any help would be truly appreciated.
 

Jon

Access World Site Owner
Staff member
Local time
Today, 01:22
Joined
Sep 28, 1999
Messages
7,305
Welcome to the forums! We are the most active Microsoft Access community on the internet by far, with posts going back over 20 years!

Here are just a couple of tips for you:

1. Feel free to ask any question you like, however basic you may feel it is, or even if it has been answered before. Our expert members thrive on helping you out!

2. If you prefer a dark theme to the forums, just go to the bottom left of this forum and click "Default style". You will then see a selection of themes to choose from. I like Shades of Blue. :)

3. If you like any of the answers you get, feel free to click the "Like" link on the bottom right hand corner of the post. If you hover over the Like link, you can even choose the type of smiley.

Above all, hang around here, have fun, learn stuff and join in.
 

Ranman256

Well-known member
Local time
Yesterday, 21:22
Joined
Apr 9, 2015
Messages
4,339
You need a table of the items a user can click the true/false field
ITEM,CHOSEN

In a form ,a subForm of the items lets users mark the items they want.
A button on the form can open the query/report

The query joins this picked table to the main data table ,pulling only those items checked yes.
 

Gasman

Enthusiastic Amateur
Local time
Today, 01:22
Joined
Sep 21, 2011
Messages
14,048
I have created a shopping list of which the main form contains "Item" and an associated Checkbox for each item. Simply then, I can tick the items I need from the shop then my trouble commences. I don't want to print the complete list - only those items that have the checkbox ticked.

I have a query that sorts the shopping list by "required" but do not know how to have the report print showing only the "required" items.

Any help would be truly appreciated.
Rather than sorting the list, just select those that are required?
The sort will not be respected by the report anyway?
 

GregMc

New member
Local time
Today, 09:22
Joined
Feb 21, 2021
Messages
6
Hi - thanks for your immediate reply - much appreciated. I've attached the database file to better explain my needs and hopefully it makes sense to you.
 

Attachments

  • Shopping.accdb
    1 MB · Views: 250

GregMc

New member
Local time
Today, 09:22
Joined
Feb 21, 2021
Messages
6
You need a table of the items a user can click the true/false field
ITEM,CHOSEN

In a form ,a subForm of the items lets users mark the items they want.
A button on the form can open the query/report

The query joins this picked table to the main data table ,pulling only those items checked yes.
Hi - thanks for your immediate reply - much appreciated. I've attached the database file to better explain my needs and hopefully it makes sense to you.
 

Attachments

  • Shopping.accdb
    1 MB · Views: 243

Gasman

Enthusiastic Amateur
Local time
Today, 01:22
Joined
Sep 21, 2011
Messages
14,048
What is the point of uploading the DB twice? :(

Your shopping list has no criteria? I would have thought you would need to check for required?
I added the criteria in the QBE design window which produces
Code:
SELECT tblShoppingItems.Required, tblShoppingItems.Item
FROM tblShoppingItems
WHERE (((tblShoppingItems.Required)=True))
ORDER BY tblShoppingItems.Required, tblShoppingItems.Item;

You can then use this as the source of your report.

HTH
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 21:22
Joined
May 21, 2018
Messages
8,463
With a long list like this it is tough to see what is and what is not selected. I usually add the options to switch views.
shopping.jpg
 

Attachments

  • ShoppingWithViews.accdb
    1 MB · Views: 100

GregMc

New member
Local time
Today, 09:22
Joined
Feb 21, 2021
Messages
6
What is the point of uploading the DB twice? :(

Your shopping list has no criteria? I would have thought you would need to check for required?
I added the criteria in the QBE design window which produces
Code:
SELECT tblShoppingItems.Required, tblShoppingItems.Item
FROM tblShoppingItems
WHERE (((tblShoppingItems.Required)=True))
ORDER BY tblShoppingItems.Required, tblShoppingItems.Item;

You can then use this as the source of your report.

HTH
Thanks Gasman for your help. I think I need to go to a more basic learning level as your reply doesn't make a lot of sense to me. Time for me to start at the beginning. Thanks anyway!
 

GregMc

New member
Local time
Today, 09:22
Joined
Feb 21, 2021
Messages
6
With a long list like this it is tough to see what is and what is not selected. I usually add the options to switch views.
View attachment 89407
Thanks for your help MajP. As I said to Gasman I now need to take a step or two back and learn a little more. I think I've jumped in with a little knowledge and haven't been able to support that. Time to get back to basics.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:22
Joined
Aug 30, 2003
Messages
36,118
Welcome to the site. FYI, I moved your thread out of the introductions forum.
 

Gasman

Enthusiastic Amateur
Local time
Today, 01:22
Joined
Sep 21, 2011
Messages
14,048
Thanks Gasman for your help. I think I need to go to a more basic learning level as your reply doesn't make a lot of sense to me. Time for me to start at the beginning. Thanks anyway!
Get your query to just select the required items. I've pretty much done that for you already.?

Then just use the report wizard with that query selected in the navigation window to build a basic report on that query.

That's it really. You can pretty it up later. get the functionality working first.
 

Users who are viewing this thread

Top Bottom