Results 1 to 10 of 10

Thread: Invoice

  1. #1
    Join Date
    Apr 2009
    Posts
    4

    Unanswered: Invoice

    Hello All,

    I am currently working on a project that will store the details of Customers, Employees and Car Parts for a Garage. I have managed to create an Invoice which holds all of the relevent information. However, when I want to create another invoice, the Invoice details (frmInvoiceDetail) which is at the bottom of the main invoice stays the same, so I'm sure I haven't linked it correctly. The Main Invoice works fine, this is what holds the Employee/Customer info.

    Also, on the main invoice, is there a way of adding multiple fields, so for example, a customer buys a door part and a type part. These parts are on seperate columns and I have not managed to find a solution. It currently gets the value of the first car part and multiplies it by the quantity.

    Database attached.

    Thank you in advance,

    Billy
    Attached Files Attached Files
    Last edited by Billyff; 04-26-09 at 14:03.

  2. #2
    Join Date
    Mar 2007
    Posts
    277
    You need to complete the LinkChild/MasterFields properties of the SubFormControl that is displaying the InvoiceDetails. Have them point to the InvoiceID field in their respective tables.
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP, ac07, ac10 - WinXP Pro, Win7 Pro
    Please reply to this forum so all may learn.

  3. #3
    Join Date
    Mar 2007
    Posts
    277
    Then it would help if the InvoiceID field in the Detail table actually had a value in it. You need to turn on Referential Integrity on your Joins and then fix the existing issues.
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP, ac07, ac10 - WinXP Pro, Win7 Pro
    Please reply to this forum so all may learn.

  4. #4
    Join Date
    Mar 2007
    Posts
    277
    I don't really understand what you want here:
    Also, on the main invoice, is there a way of adding multiple fields, so for example, a customer buys a door part and a type part. These parts are on seperate columns and I have not managed to find a solution. It currently gets the value of the first car part and multiplies it by the quantity.
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP, ac07, ac10 - WinXP Pro, Win7 Pro
    Please reply to this forum so all may learn.

  5. #5
    Join Date
    Apr 2009
    Posts
    4
    Ah, thanks RuralGuy, that's sorted it. Just need to remember to complete the LinkChild/MasterFields in the future. Fab.

    About my last question, if you look at the attached picture, I have highlighted the 'price' field. At the moment, this is multipled by the quantity of that product (field to the left) and the answer is then shown in the subtotal. However, if a customer decides to puchase two different parts, another column is created with this details. This is where I'm having difficulties figuring out how to add this into the maths too.

    I hope that makes sense.

    Billy
    Attached Thumbnails Attached Thumbnails Invoice adding multiple fields.jpg  

  6. #6
    Join Date
    Mar 2007
    Posts
    277
    You have said Column but do you mean Row as you have shown in your attachment where there are two Rows but the second row is not included in the SubTotal?
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP, ac07, ac10 - WinXP Pro, Win7 Pro
    Please reply to this forum so all may learn.

  7. #7
    Join Date
    Apr 2009
    Posts
    4
    Yes I meant Row, sorry for the confusion.

  8. #8
    Join Date
    Mar 2007
    Posts
    277
    See attached. Done with a calculation in the query of the SubForm and a control in the footer of the SubForm.
    Attached Files Attached Files
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP, ac07, ac10 - WinXP Pro, Win7 Pro
    Please reply to this forum so all may learn.

  9. #9
    Join Date
    Apr 2009
    Posts
    4
    Thanks RuralGuy, that's exactly what I was after. Cheers.

  10. #10
    Join Date
    Mar 2007
    Posts
    277
    Glad I was able to help. Have fun with the rest of the project.
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP, ac07, ac10 - WinXP Pro, Win7 Pro
    Please reply to this forum so all may learn.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •