Results 1 to 8 of 8
  1. #1
    mmahmod is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    6

    Condition on the value selected from combox

    Dear Gents



    I have a main form for payment and sub form for invoices and the relationship is many to many
    I would like in to chose the invoices from the combo box in the sub form based on condition
    If the remaining amount of the invoice is less than the total payment , then accepted and updated the field of amount paid
    If the remaining amount of the invoice is less than the remaining balance of the payment, then rejected it after show me a notification for that
    Or if there a better way to handle it
    I attached the file

    Thanks in advance
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    I would not track payments to specific invoices. I would credit entire payment to the account then calculate the difference between invoices and payments to determine net balance.

    Many off-the-shelf accounting programs already available, Quickbooks is one I have used. Relatively inexpensive and easy to learn and use. Also, probably Access database template available for this functionality.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mmahmod is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    6
    ok but i'm not dealing with credit invoices , all these is cash invoices but i can't track what paid and what is not
    so i work on this file tracker...

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    What you want to do doesn't make sense to me.

    Why would there be partial payment on cash invoice?

    Also, if the remaining amount of the invoice is less than the remaining balance of the payment, why would you reject payment - did you mean 'more'? For that matter, why would any payment be 'rejected'? What do you want to do if 'rejected'?

    Record sales and payments as separate transactions. Calculate the difference for net balance.

    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    mmahmod is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    6
    first thanks for your reply
    second
    maybe I wasn’t clear , let me explain more
    as I said all the invoices is cash not credit
    and I face 3 condition for payment

    1. One payment against one invoice
    2. One payment against multiply invoices
    3. Partial payment against one invoice


    And regarding to point 3 I will explain more , sometime the sales men give me the payment for the invioce in two different ways
    Ex : I have invoice with 150,000 , the sales man submitted to me 50,000 and 100,000 direct deposit in bank
    So I have to do Partial payment to invoice with 50,000 and another with 100,000 and I can’t make it in one payment
    Because the cash & bank different accounts and I take entries on our financial system by banks and cash


    So that’s way I make the relationship many to many between invoices and payment
    And I need to know if I query for any invoice , show me how it paid


    and I see that case is handle in some system like oracle with apply the payment to the invoices

    about your question of reject the invoice
    I mean when I record in file that I have payment with 5000 and I applied to invoice by 3000 so ,then system accepted because its less than the payment
    And when I applied to next invoice by 2500 , then system accepted only 2000 and remaining in invoice 500 not paid
    And when I applied to another invoice , then system refuse and MSG appear that it can’ t be paid because there is no still remaning in payment to apply

    I hope I Clearfield these points

    Thanks in advance

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    The subform shows all the invoices for salesman (maybe should be sales_person) on the main form, or it should - need code to refresh the combobox when moving to another record on main form. In frm_receipts Current event:

    Me.frm_transactions.Form.Combo11.Requery

    Presumably these invoices are from more than one customer. How does salesperson know which customer (which invoices) the payment is for?

    Still don't understand what your issue is about recording payment against multiple invoices. Isn't that what the subform is for?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    mmahmod is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2012
    Posts
    6
    my issue in the first post up my friend....

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    I have read and re-read the entire thread. I just don't understand WHY there is an issue. If you want to break up a payment between invoices AND allow each invoice to have multiple payments, then make multiple records that associate invoice ID and payment ID.

    Did you fix the combobox? At least I can offer you that much.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-17-2012, 12:27 PM
  2. Combox Box Help
    By BLD21 in forum Reports
    Replies: 3
    Last Post: 09-22-2011, 01:06 PM
  3. Combox Box Outputs the ID in text
    By Alexandre Cote in forum Queries
    Replies: 3
    Last Post: 07-20-2010, 08:47 AM
  4. Combox not filling the rest of the form
    By britt britt in forum Forms
    Replies: 2
    Last Post: 10-27-2009, 04:55 AM
  5. Replies: 3
    Last Post: 02-20-2009, 02:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums