Hi Everyone I am Diane new to this site and hope it can help me and maybe I can help someone.

diane3686

New member
Local time
Today, 14:54
Joined
Jul 3, 2023
Messages
1
I would like to ask if anyone has the easiest solution to the following:
I have yes/no field approx 6 if anyone of this are checked, I do not want the related record to be visible eg Record_Delete, Record_ITTREd, Record_Archive, Record_Closed etc if any of these boxes ticked do not show the record to which they relate, rather than have to say do not show this field or this field, just the whole record please. Especially for when I print a report and I do not want these to show. Thank you.
 
Welcome to Access World! We're so happy to have you join us as a member of our community. As the most active Microsoft Access discussion forum on the internet, with posts dating back more than 20 years, we have a wealth of knowledge and experience to share with you.

We're a friendly and helpful community, so don't hesitate to ask any questions you have or share your own experiences with Access. We're here to support you and help you get the most out of this powerful database program.

To get started, we recommend reading the post linked below. It contains important information for all new users of the forum:

https://www.access-programmers.co.uk/forums/threads/new-member-read-me-first.223250/

We hope you have a great time participating in the discussion and learning from other Access enthusiasts. We look forward to having you around!
 
Welcome aboard!
 
I would like to ask if anyone has the easiest solution to the following:
I have yes/no field approx 6 if anyone of this are checked, I do not want the related record to be visible eg Record_Delete, Record_ITTREd, Record_Archive, Record_Closed etc if any of these boxes ticked do not show the record to which they relate, rather than have to say do not show this field or this field, just the whole record please. Especially for when I print a report and I do not want these to show. Thank you.
How are you meant to get them back?
If the checkboxes are bound, just requery the form or it's recordset and exclude those records whose fields are true.
 
Hi. Welcome to AWF!
 
"Normally," you can just use one field to represent the six checkboxes,especially if only one checkbox will apply at a time. You could then use a criteria in a query to exclude those records from your form.
 
Welcome to AWF! Diane.
Regarding your question, I think we need more info. Perhaps an example showing what exists and what's supposed to hapen, when. Also, it might be better to repost the question in the Forms section. Typically the Introductions is just that-introduction --who I am and perhaps why I'm here.
Questions and answers and dialog are in the various forums.
 
I have yes/no field approx 6 if anyone of this are checked, I do not want the related record to be visible eg Record_Delete, Record_ITTREd, Record_Archive, Record_Closed etc if any of these boxes ticked do not show the record to which they relate, rather than have to say do not show this field or this field, just the whole record please. Especially for when I print a report and I do not want these to show. Thank you.
How is the related record shown on the form? Are we talking about a subform? Are the yes/no fields bound to a table or are they unbound? In a case like this a sample database would be most helpful in getting to your solution since context is everything.
 
Welcome! FYI, I've moved your thread to a more appropriate forum.
 
Hi Diane, Welcome,
As others have mentioned, you have a design flaw that should be fixed sooner rather than later because the more forms and queries and code and reports you have, the more changes you need to make to fix this.

When a value is mutually exclusive - only value allowed at one time - which is what it sounds like you have, then rather than using multiple fields to store values, you would use one. You can then use a combobox to display the ONE value chosen or you can use an Option Group control which will show a button or checkbox for each option but still store only a single value.

In any event, you would use criteria in the report's RecordSource query in order to select only active rows.

For a form, the problem is more difficult, you can't just exclude these records as you do with a report because you have to allow the value to be changed. In this case, the best solution is to have an unbound option group in the form's header with three options - All, Active, InActive
Then the Form's Recordsource query would have criteria that referenced this Option Group.

Where IIf(Forms!yourform!youroptiongroup = 2, IIf(StatusGroup = "Active", True, False), IIf(Forms!yourform!youroptiongroup = 3, IIf(StatusGroup = "InActive"), True, False), True)

This is simplified. When I have multiple status' that fall into active and inactive, the tests can get very confusing so I add a second field to the status table so I can group the items to make this type of selection easier.
 

Users who are viewing this thread

Back
Top Bottom