Copper Contributor

How can I uncheck or exclude an item from the bill balances and grey it out when I am not supposed to pay for it in MS Access?

Eg the bill on the form lists items likethis:

Fish $200 

Rice $100

Books $120

Total payable $420

Then if I uncheck out say books $120 the balance reduces to $300 without actually deleting it from the form or the source table.

I'll be grateful for your help.

10 Replies
You'll need an additional field in the table. That field can be called something like "PayableByMe", or probably something more appropriate. You can make it a boolean, or Yes/No field.
In the form, check the control bound to this form to indicate the line item is payable by you, or uncheck it to indicate that it is not your responsibility to pay it.

In the control which calculates total payable, add a filter that only sums up records where this field is checked.

Thanks a lot for your prompt response. I did as you advised and got the results by use of a query.
But is not there a way of doing it straight on a form, where you directly uncheck the item, and it still remains seen on the form, however unchecked, but the totals get adjusted?
I've seen a tutorial demo where such was done and the idea captivated me. I don't know if that would need some coding.
Thanking you in anticipation.



I described that in my first post, but it was confusing the way it was written:


"In the form, check the control in the form which is bound to the field in the table to indicate the line item is payable by you, or uncheck it to indicate that it is not your responsibility to pay it."

Thanks for your response. This is what I know I've even doing and the results work just fine. Only that the method of excluding one item is quite different from this procedure. Otherwise that's alright.


That's a bit confusing to me. I know it's excluding one item at a time because each item is a record and the record has the Boolean field indicating that item is to be paid or not. Isn't that what you want? What do you mean by "this procedure", if not?

The totals query would be set up to sum only checked items, or items with "Yes" in that field. So, what is different?

Thank you for your firm commitment to help me out.
As I said, I am getting the results depending on whether I select 'Yes' or 'No' after applying a query.
But my interest is on how, possibly, you get the values directly on a form when you click on the check box with/without filtering the Yes or No values with a query. As in the example I gave in my first question, say you have;
Item one: $100
Item two: $50
Item three: $25
Total: $175
Assuming all the values are set to Yes or no, how if I uncheck one Item do I get the total reduced directly on the form, nd when unchecked the item still appears on the form but only its value is not applied in the total? Is there some coding involved behind this work around?
I hope, may be, I have asked clearly now.


First, my apology for the slow response. This forum has to be the least usable forum around. :sad:


So, perhaps I didn't dig deep enough into the original problem. There are actually two different things going on it seems. One is the ability to check which items to include.


The other is the calculation on the form showing the total of the values for "checked" items. That's the part I overlooked.


How are you displaying that total on the form? Is it an expression in a control? Or, as I perhaps wrongly assumed, a calculation in the underlying query? If the former, there's one approach. If it's the latter, there is another approach that would work better. 





This might illustrate the two approaches mentioned previously. There are other variations that could be used, so consider these starter ideas.

Thanks for your help. I think I've ill try to workaround the second approach and if I encounter any challenge, I'll ask the community again. Meanwhile I'll go through the file you sent and then I'll let you know of the outcome.

Just a kindly request however, if you could send me a link to some of the most active forums,I'll greatly appreciate.

Good day!

Oh yes, this is what I was asking about.
Sir, I can't thank you sooo much!
Anyway I have a lot of things to learn to get to doing what is in the file.
I understand that it involves some coding to get the expected results. I would appreciate for any kind of material related to this.
Thank you once again!
Have a nice day!