Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2009
    Posts
    2

    Invoice

    [SOLVED]



    Hello All,

    I have recently started to teach myself Microsoft Access and I managed to create a pretty decent Movies database for my collection.

    I have moved on and am now trying to create a Car Parts database (attached) for a made up Garage which will store the care parts details along with the Employee/Customer details which has been okay. However, from reading around the web, I see that when creating an invoice, I need two seperate forms; a master and a details form. I have done this but when I test my master invoice I get the following error message:-

    'You cannot add or change a record because a related record is required in table 'Invoice Master' so I guess I haven't linked my tables correctly.'

    I'm no Wiz at Access but am keen to learn - any help or guidance would be much apreciated.

    Cheers,

    Billy

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Your Details table needs a ForeignKey field of the PrimaryKey of the Invoice table. This is a 1:M relationship and it is helpful if you use an AutoNumber for the PK and a Long Integer as the FK. Then when you display the Details in a SubForm on the Invoice MainForm, properly completed LinkChild/masterFields properties will keep the Details table FK up to date.

  3. #3
    Join Date
    Apr 2009
    Posts
    2
    Thanks for the prompt reply RuralGuy, I will give it a go.

    Edit: That's fantastic and ever so simple. Thanks for the help.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You're very welcome. Try using this Thread Tool.

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

Similar Threads

  1. Invoice Number
    By rzwoo in forum Access
    Replies: 0
    Last Post: 02-25-2009, 01:30 AM
  2. Replies: 3
    Last Post: 02-13-2008, 09:55 AM
  3. Duplicating lines in an invoice report
    By GordonEdinburgh in forum Forms
    Replies: 0
    Last Post: 04-21-2007, 12:20 PM
  4. Replies: 0
    Last Post: 12-11-2006, 04:55 PM
  5. inport data into invoice from Purchase order database
    By Wrangler in forum Import/Export Data
    Replies: 2
    Last Post: 10-30-2006, 12: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