1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access Checkbox/VBA

Discussion in 'Business Applications' started by karlhaywood, Dec 11, 2010.

Thread Status:
Not open for further replies.
Advertisement
  1. karlhaywood

    karlhaywood Thread Starter

    Joined:
    Jan 17, 2010
    Messages:
    680
    Hi,

    I have a check box on a form called "Paid" when checked i would like Access to give the record a paymentID and also disable the checkbox so i cant be changed. Is this possible?

    Thanks.
     
  2. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    How will the paymentID be generated, from a "payment" table/form or just a number?
     
  3. karlhaywood

    karlhaywood Thread Starter

    Joined:
    Jan 17, 2010
    Messages:
    680
    Which option would you suggest?
     
  4. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    Well normally when someone pays you enter a "paid" date, at that point you would set the "paid" checkbox to Paid and if required give it a PaymentID as well, but that could just be an Autonumber.
    But you may need to allow for multiple payments for one bill, in which a manual click of the paid checkbox would be better.
     
  5. karlhaywood

    karlhaywood Thread Starter

    Joined:
    Jan 17, 2010
    Messages:
    680
    so should i setup a table with paymentID, JobNo, Client, Payment Date?

    but how would i go about multiple payments for one job?
     
  6. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    Can you see customers paying in installments or partial payments?
    I created a version of your database which had "Accounts" for both incoming stock and outgoing jobs where the setup was for partial payments and it maintained a "balance" for each Supplier or Customer.
     
  7. karlhaywood

    karlhaywood Thread Starter

    Joined:
    Jan 17, 2010
    Messages:
    680
    Yes they will pay in installments because a 6 month job worth £60,000 will pay £10,000 a month
     
  8. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    Take a look at this version of Invoicing. It has a Customer payment table and in the Customer table their overall Balance.
    When payments are made/ammended VBA code updates the Customer Balance.
    I think there is a copy of it on the forum already, but I can't remember who I posted it for or when .
     

    Attached Files:

  9. karlhaywood

    karlhaywood Thread Starter

    Joined:
    Jan 17, 2010
    Messages:
    680
    Hi OBP great work, i think this is abit out of my league. I do like the way it works though! I was just thinking some VBA to generate a number (Just an ID)
     
  10. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    What sort of ID though?
     
  11. karlhaywood

    karlhaywood Thread Starter

    Joined:
    Jan 17, 2010
    Messages:
    680
    THES1
    THES2
    THES3

    That sort of ID would be generated when the box is checked
     
  12. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    Where would the last THES number be stored?
    You need a VBA Recordset to open the table to look it up to increment it.
     
  13. karlhaywood

    karlhaywood Thread Starter

    Joined:
    Jan 17, 2010
    Messages:
    680
    It will be stored in the invoice table. I suppose i could just format the autonumber something like

    THES "0001"
     
  14. OBP

    OBP Trusted Advisor

    Joined:
    Mar 8, 2005
    Messages:
    18,834
    You could, let me know what you want to do.
     
  15. karlhaywood

    karlhaywood Thread Starter

    Joined:
    Jan 17, 2010
    Messages:
    680
    I would like to do it with the recordset please. Can we take it easy baby steps lol. I reallt like learning Access :)
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/967764