Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Canada
    Posts
    284
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem Entering Lines On An Invoice (Access 2000)

    I'm trying to redesign my invoice form, but I can't seem to enter more than one line on an invoice. I keep getting a "You cannot add or change a record because a related record is required in tblInvoices" error.

    I want to be able to select a student on the frmInvoices by Student form (that works). Then I click Invoice Details button and it goes to the frmInvoices form. From there, I want to be able to select what year I want to invoice. If there are already lines on that year invoice that I created before, I want to just add some more lines to it. Otherwise, I want to creat a new invoice for that year.

    I only want one invoice per year. But I just can't seem to enter more than one line on the invoice. I checked tblInvoices, and I can't see anything wrong. I've attached a copy of my db. I've been working on this for two days with no luck, so anyone who could shed some light on this would be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Problem Entering Lines On An Invoice (Access 2000)

    Account Info query is dependent on Total Invoice Query and Total Payments Query, both of which are missing. So the Account Info Subform and hence frmInvoices by Student don't work.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Canada
    Posts
    284
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problem Entering Lines On An Invoice (Access 2000)

    I'm a little confused. If I get rid of the Account Info query and the Account Info subform. It should not really matter about the Account Info query, though. It's not related to my Invoice form, is it? I'm just going round in circles trying to get this to work.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Problem Entering Lines On An Invoice (Access 2000)

    Trying to open frmInvoices when frmInvoices by Student is not open is problematic (for example, the default value for StudID is not valid), so I tried to open frmInvoices by Student first, with an error message as result.

    But never mind, I think your problem is that frmInvoices and frmInvoiceDetails Subform should be linked on InvID, not on SchoolYearID.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Canada
    Posts
    284
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Problem Entering Lines On An Invoice (Access 2000)

    Okay, now the line problem is no more, but is there a way I can select the year in the Invoice form so that I see the invoice lines for that year, and if I select another year from the drop down box I see the invoice lines for that year?

    For example, under year 2003/2004 I put in Elementary for $35.00, then I go out of my invoice form. A few days later I want to add another line of Local Levy for $10.00. Then I want to start an invoice for 2004/2005 for a student that is paying for next school year. So I want to select year 2004/2005 and start entering lines for that invoice. How would I do that?

Posting Permissions

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