Forum Discussion

CletusK's avatar
CletusK
Copper Contributor
May 16, 2023

UNCHECK BALANCE ITEM FROM A BILL

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.

  • George_Hepworth's avatar
    George_Hepworth
    Silver Contributor
    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.
    • CletusK's avatar
      CletusK
      Copper Contributor

      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.

      • George_Hepworth's avatar
        George_Hepworth
        Silver Contributor

        CletusK 

         

        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."

Resources